Answer the question
In order to leave comments, you need to log in
How can curl_multi be kept within 5 rps?
I made a function with multicurl that takes an array of links, the array is always no more than 5 elements. The function returns the totaltime spent on 5 links. If the totaltime is less than 1.0, then I subtract the totaltime from 1.0, and convert the difference to microseconds and send the difference to usleep as an int (i.e. I stop the script for the number of microseconds that were not enough for a whole second). After that, the multicurl twitches again. But in some places it's still a response from the recipient with the code 429.
How can you get out of this situation other than sending the request again if 429?
Answer the question
In order to leave comments, you need to log in
And what about rps?
1) Add different browser http headers. may I help.
2) Catch exceptions and resubmit the necessary requests.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question