So, you are making up to 150 requests in a 30 second period (10 "parallel requests", with a 2 second pause in between). And failing at 80 to 100+ seconds of operation and 400 to 500 total requests?
- This other failure mode (NOT a 503) trips after about 32-ish seconds and 180 (sequential) requests.
- It was previously reported that making about 2 calls per second trips a 503 in about 80 calls (41-ish seconds). That same comment also said that a 503 still occurred with intervals as long as 920ms (which I'm not sure is still true).
So, try:
- Increasing the interval between batches to 30 seconds (SWAG'd number).
Increasing the interval between batches to 30 seconds (SWAG'd number).
OR
OR
- Making your requests in "batches" of 1, with an interval of 1 second in between. If that fails, increase to a 2 second interval.
Making your requests in "batches" of 1, with an interval of 1 second in between. If that fails, increase to a 2 second interval.
Obviously these are just workarounds, but the documented history of response to this family of bugs is not promising. (See the linked Q&A's to start.)