developer-tools icon indicating copy to clipboard operation
developer-tools copied to clipboard

Developer Tools doesn't handle rate limiting / retry requests

Open amwolff opened this issue 6 years ago • 9 comments

Data generator always leaves some requests failed. I assume this is due to unhandled rate limiting. Requests should be allowed to be retried.

amwolff avatar Aug 28 '18 13:08 amwolff

good

aekinkjet avatar Oct 08 '18 02:10 aekinkjet

No, this is bad actually.

amwolff avatar Oct 08 '18 09:10 amwolff

Any update here? More and more often my order import completely fails.

Screen Shot 2019-05-13 at 3 40 45 PM

TotalJabroni avatar May 13 '19 20:05 TotalJabroni

My problem here is that when you are creating orders for existing customers, it has to download the customer list fresh every time.

With a couple hundred pages of customers, since the tool does not self-throttle, you'll always fail to do the meaningful work that comes after the download.

I tried figuring out if it's possible to create a throttling profile in Chrome Dev Tools that slows this down enough to not cause issues, but even at a custom setting that is half of 2G, most requests still fail.

csciuto avatar Jun 14 '19 23:06 csciuto

There's more to this it looks, I think my original guess as to what's going on was wrong. The rate limit header is reporting 0/320 requests when I get the 429, and retry-after is coming back empty. This is the same orders.json endpoint that @TotalJabroni is using, and I'm getting the same "exceeded 0 calls per second" message.

It seems to me like what's actually happening here is this endpoint only allows four requests at once, but Chrome supports a few more than that. End result is that the tool is kicking off request after request that fail very quickly while the four in-process ones take a second or so to complete.

csciuto avatar Jun 17 '19 17:06 csciuto

@csciuto Care to share how you worked around this? :P

felipap avatar Jul 29 '19 01:07 felipap

@felipap I really didn't work around it. Given enough time, you can create data four items every X minutes, with massive amounts of failures in between, which is not ideal for us the clients, and I'm sure the servers don't appreciate it, either.

csciuto avatar Jul 29 '19 14:07 csciuto

@csciuto Would one be able to create a Shopify app that does this the right way ie. creates custom users/orders/products for developer testing? Do you see a real need for this?

felipap avatar Aug 01 '19 06:08 felipap

@felipap I consider it a nice-to-have. My QE org I believe already has tools that do this programmatically, but as a dev and just fooling around, it wasn't great that it was so hard to create data using the provided tool.

csciuto avatar Aug 06 '19 01:08 csciuto