Error Code 4002 - Server timeout exceeded. Request has failed.
Does anyone have experience dealing with Error Code 4002 (Server timeout exceeded. Request has failed.), and has any ideas on how to handle it.
It seems to come up for me when i am trying to update larger sheets
Thank you
Answers
-
I don't think I have seen this type of error except maybe when Smartsheet is having issues that end up appearing on the Status Board https://status.smartsheet.com/
Being an error from Smartsheet, you may be best to contact their API support directly.
However, since you mention this is occurring on a large sheet, I have a few questions/suggestions:
- Are you updating many rows at once? If so, can you break up the updates into a number of smaller batches? The smaller batches could be based on splitting the rows and/or columns to be updated in each request.
- Is the sheet "large" due to the number of Rows, Columns or Both?
- Do you consistently get this error when running this API call with the same request (sheet, same row updates)? Or is it intermittent?
- Does you update trigger a large number of Workflows or affect many VLOOKUPS?
- Are there other API, Webhooks that could be running at the same time? Including ones from Third-Parties.
-
Thanks for your help Lee!
I am actually already splitting it by 400 rows at a time, you think that is too much?
The sheet itself is large because of a combination of columns and rows.
The sheet has some more complicated formulas...
I don't have anything else that would be updating this at the same time
-
I just looked through my code for the closest situation I have to yours. And I see that I was updating 400 rows at a time too. I have not seen these 4002 errors with my use case.
400 must be a number used in some sample code in the API docs or Stack Overflow?
I would suggest trying to reduce the number. I would try reducing it dramatically. Try decreasing by half (200), and then either increase or decrease by 100 depending on if it works or not. Repeat until you find a stable chunk size.
If there are still errors, I think I would try escalating this to Smartsheet API support.
-
Thanks Lee, will give it a try!
Side point related to this, I put in an idea to implement 'idempotency' in API requests.
Sometimes in these larger requests that takes a long time, we should be able to poll the server and see if it is completed (using a request ID etc.)
If you didn't yet please vote on it!
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 67 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives