Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

403 rate limit after only 1 insert per second

My app is occasionally (once per day) running a bulk insert of around 1,000 files. After a handful of inserts I start getting 403 rate limit responses. Since my app does the inserts sequentially, my attempted insert rate is never higher than 1 per second.

I've checked that I have billing enabled and that my quota limits are 100+ per second, so I don't understand why I'm getting throttled so aggressively. The consequence is that the insert is taking over an hour which isn't a great advert for Drive :-(

like image 667
pinoyyid Avatar asked Aug 30 '13 09:08

pinoyyid


2 Answers

Seems the answer is that Drive will allow up to 30 or so inserts before rejecting with 403 errors. The precise figure, and the rate at which the rate limit is de-restricted are not made public. See also 403 rate limit on insert sometimes succeeds

like image 105
pinoyyid Avatar answered Sep 28 '22 16:09

pinoyyid


You need to implement exponential backoff as Google describes in their documentation.

like image 33
Jay Lee Avatar answered Sep 28 '22 16:09

Jay Lee