API Data Download Error

Dear Support Team,

We are facing this issue across multiple projects today while downloading data through the API.

Error Message:

Synchronous export failed. Some useful information may appear below. You may retry again after 284 seconds. Sooner retries will return the same error without attempting the export again.

Technical Details:

{
  'error_type': 'CursorNotFound',
  'error': "cursor id 3922573500419131242 not found, full error: {'ok': 0.0, 'errmsg': 'cursor id 3922573500419131242 not found', 'code': 43, 'codeName': 'CursorNotFound'}"
}


This issue is affecting multiple projects and preventing us from downloading data through the API. Could you please investigate and resolve this issue as soon as possible?

Your prompt support would be highly appreciated.

Thank you.

@azamiqbal, could you kindly list out the exact steps you performed to execute this? Please also let us know the server you are using. This should help the community to understand your issue and help you further.

FWIW I’ve confirmed that synchronous exports are currently working on both Global and EU servers. Can you perhaps try performing a new export for your project(s) - with your desired ‘Advanced options’ export settings - and then using the newly generated CSV or XLSX links from the resulting export-settings URL

1 Like

I have approximately 50,000 submissions with repeat group records on KoBoToolbox (https://eu.kobotoolbox.org/).

When data is fetched in our dashboard through api, around 2 users use the dashboard simultaneously. If one additional user tries to fetch the same dataset, an error occurs.

Previously, we did not experience this issue with the same project and dataset size. Could you please investigate whether there have been any recent changes or limitations affecting data exports or API performance?

Synchronous export failed. Some useful information may appear below. You may retry again after 255 seconds. Sooner retries will return the same error without attempting the export again

{‘error_type’: ‘CursorNotFound’, ‘error’: “cursor id 3816152022720327276 not found, full error: {‘ok’: 0.0, ‘errmsg’: ‘cursor id 3816152022720327276 not found’, ‘code’: 43, ‘codeName’: ‘CursorNotFound’}”}

Thanks for the additional info. Just to confirm, you are (only?) seeing this issue when multiple users are attempting to (somewhat) simultaneously fetch the synchronous export link?

Yes, that is correct. We are only experiencing this issue when multiple users attempt to fetch the synchronous export link at roughly the same time. When a single user performs the export, it generally works without any problem. However, when several users try to access the same export simultaneously, the export fails and returns errors such as AutoReconnect or CursorNotFound.

i am enable everyone download data from api and not required username and password

Any updates? We need urgent solutions. Please guide me.

If you are trying to fetch (or for that matter, export) over 50,000 submissions, then you may well be hitting server timeout limits; see Using the API for synchronous exports — KoboToolbox documentation

Basically, synchronous exports will trigger the equivalent of a new file export, which will then be cached on the server to for 5 minutes to satisfy any immediate subsequent synchronous export URL fetches. In this way the server doesn’t get bogged down continually performing a full export for every request that comes in. But if this is timing out, say because of a very large number of submissions, then any further requests (eg by a different user trying the same synchronous export link) are probably going to immediately fail too which may be causing the specific error that you are seeing.

I might suggest changing your export settings as suggested in the doc, to either limit the date range of submissions you are trying to pull, and/or filter out any questions that you dont really need. That will reduce the size of the export such that it can be completed within the required time.

Alternatively, if you are truly trying to synchronize 50K+ submissions effectively ‘live’ into your workflow, then instead of having to re-fetch all 55K (and growing?) every time - which is essentially what the synchonous export link is doing for you - you may need to consider using the Kobo REST Services instead. This basically sends you each single new submission as it comes in, rather than fetching all of them every time.

The getting submissions one-at-a-time via the REST service is certainly not as convenient as being able to resync everything constantly, but when you are dealing with very large data sets like yours you may be starting to hit the limits of what synchronous exports can reasonably accommodate.

Can we purchase a package that includes unlimited data access through the API? Alternatively, could you provide some examples of REST service requests and responses? I have a repeat group and would like to see how it can be implemented.or dateise filter i have columns Survey_Day i want filter data through Survey_Day