Leave a comment at the end of this page or email contact@krishagni.com
FAQ: How to avoid Error: 429 Too Many Requests ?
When does REDCap give “Error: 429 Too Many Requests” error?
It is due to a REDCap security setting that limits the number of API requests per minute or per hour from a single IP address or API token.
Why does it occur during OpenSpecimen integration?
Sinc OpenSpecimen syncs data by making multiple API calls, it can easily trigger this error.
How many APIs calls does OpenSpecimen make?
There are two types of syncs:
Instrument sync
Data record sync
The number of calls depends on
frequency of each sync
number of projects
number of instruments per project
number of fields per instruments
number of subjects per project.
Instrument sync
Syncs the Form metadata with RC Instruments.
i.e., add/edit/delete new fields, adding new instruments to a project, etc.
All instruments are synced in each run.
Ideally, it should be set to run nightly or match with REDCap’s study update frequency (some customers do study updates on a fixed day/time).
Data sync:
For each project, retrieve the list of subjects that have any new data (create or update) since the last sync run (i.e., incremental update)
For each such subject, the entire record snapshot is retrieved as key=value pairs in chunks of 1000 (configurable in settings page)
How to reducing number of calls?
Reduce the frequency of both runs
Run instrument syncs nightly, since instrument updates are infrequent.
Exclude unwanted instruments (or include only wanted instruments)
Increase the snapshot size in the CP->RC setting to 50000. (default is 1000).
Now what is this “snapshot page size”!?
Read here.