API rate limit or error/timeout?
Hi,
I am trying to update/create/add records/gifts etc for 6000+ constituents using the API. It works fine, I can do 20 or so without a problem but it always stops after a minute. It doesn't seem to matter how slowly I make it run, i.e pausing after each call, refereshing token. it still seems to get to about a minute and then it stops.Could it be cause of a bad call? I was trying to monitor it through the analytics page to see but it seems fine.. I will keep checking that. I just can't think why it stops, I slowed it down to process just 1 record over 4 calls very slowly then it just processed that one.. it feels to me like it times out after a minute. Any ideas
Happy New year to all
I am trying to update/create/add records/gifts etc for 6000+ constituents using the API. It works fine, I can do 20 or so without a problem but it always stops after a minute. It doesn't seem to matter how slowly I make it run, i.e pausing after each call, refereshing token. it still seems to get to about a minute and then it stops.Could it be cause of a bad call? I was trying to monitor it through the analytics page to see but it seems fine.. I will keep checking that. I just can't think why it stops, I slowed it down to process just 1 record over 4 calls very slowly then it just processed that one.. it feels to me like it times out after a minute. Any ideas
Happy New year to all
1
Comments
-
I see now, none failed. Made 20 successful calls for that run, processed 4 records in total. It's not calling an end point faster than once every 2 seconds either. I refresh token for each new record, if I don't, still same result though.0
-
Analytics show all returned codes to be successful codes.0
-
Ah it is probably php, silly me. It's because I set it up to not timeout already but I probably missed a setting in ini file. Must be that ^ ^1
-
Check the return codes of the API HTTP requests.
If there's an error occurring after that minute, chances are you're getting a 429 Too Many Requests response. If the SKY API throws that error, it will also include a Retry-After HTTP response header with the number of seconds to wait. Check these two resources:- https://developer.blackbaud.com/skyapi/docs/basics#response-status-codes
- https://developer.blackbaud.com/skyapi/docs/resources/in-depth-topics/api-request-throttling
Another possibility is running out of memory, if you aren't aggressively managing variable scope. For large looping contexts like that, I usually try to make sure only 1 record is in memory at a time. (E.g. use single-record DB cursors, parse a single line of a CSV, or use a streaming XML parser.)
What error does PHP report in the logs after the minute?0
Categories
- All Categories
- 6 Blackbaud Community Help
- 211 bbcon®
- 1.4K Blackbaud Altru®
- 402 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 657 Blackbaud Grantmaking™
- 577 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 941 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.7K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 248 ResearchPoint™
- 120 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 240 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Grid View Batch
- 3 (Closed) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 796 Community News
- 3K Jobs Board
- 54 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)