Closed corycaywood closed 7 years ago
Added a queue using the "promise-request" module so that no more than 29 connections can be made at once. This has reduced the number of request retries caused by 500 errors.
Was it measured somehow? How much articles and sections were in category you uploaded? Were there any cases when uploading failed with error?
The issue with retries due to 500 errors occurs most often during resource uploads because they maintain a connection for a longer time period. So I tested on a repo with 80 resources.
Before implementing this solution, the tool would log about 30 retries in a row. Now it logs 10 or less.
I tested how many connections can be made at once before Zendesk returns a 500 error, and it was around 30 connections, so that's why I chose 29 as MAX_CONCURRENT, but this number maybe still needs to be adjusted.
Resolves #13
Added incremental retries - each retry will take twice as long as the previous retry.
Added a queue using the "promise-request" module so that no more than 29 connections can be made at once. This has reduced the number of request retries caused by 500 errors.