-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shopify: Exceeded 2 calls per second for api client #56
Comments
Hey @dnlmzw! Great catch here. You're right, that some sort of Queue would be one way to help spread updates out so you don't hit the limit. The other is (as suggested in the link you shared) is to up your limit by moving to Shopify Plus. I don't have plans at the moment for a built-in Queue to handle this, but if you (or anyone else) has ideas/solutions, feel free to submit a PR! |
Hey @dnlmzw, All I had to do was change out the webhook urls from my own api endpoint to one they give. From there I set a rate limit of 2 per second to the /api/shopify/product-update endpoint, and it seems like it's working fine for now! There's a free plan of 10,000 events per month. |
@j4ysen What a lovely solution. Would love to have this built in at some point, but it also feels like quite some work to build something that works reliably (which I don't have time for with this client), so will definitely check out hookdeck. 10K events also seems reasonable. |
@j4ysen I've now had time to test it out and it works like a charm! Had to set the limit to 1 sec though, since 2 seconds was apparently still close enough for it to trigger the rate limiting — Also, having the interface to retry failed calls, and having that general overview is such a great feature. @ndimatteo I'll leave it up to you to decide whether this is solved or not. Maybe adding it to the documentation could be useful :) |
Thanks for sharing this. I tried this but got error code 500 when trying to connect to my vercel domain (the CNAME is successfully validated). When do those /api/shopify/ API endpoints get created? I wonder if I am missing a step. |
@djclarkson |
Thanks @j4ysen yes site was deployed. I got error 500s for product-delete and product-update and 404 for product-create. but haven't had a chance to look further. |
I have previously used ngrok to set up a local server that I pointed my Shopify hooks to. You'll then be able to see errors in your CLI, and can therefore debug it a bit faster. |
Hi folks, I'm one of the creators of hookdeck. It was rewarding to read about your experience. I wanted to jump in to contribute a bit more and offer help! First of all, you can check out our cli, a free alternative to ngrok with a permanent URL (amongst other things). It almost mimics the behaviour of Hookdeck for what you are ready to go to production, you'll just need to add a destination URL. @djclarkson The One more thing, all though this might not be obvious, people tend to prefer using a single Hookdeck URL. You can create a unique @ndimatteo All of this configuration can also be automated, would there be interest in baking methods to configure the webhooks within the repo? I could find some time to work on it and open a PR if there is interest :) |
Very cool product! Going to keep a close eye on my logs. Will def use this if I hit rate limits. Edit: Scratch that, this looks awesome. Going to move some of my webhooks to Hookdeck. I like that it keeps a record of webhooks. ❤️ |
@alexbouchardd so sorry I didn't see your follow-up on this! Great job with hookdeck and for explaining alternative solutions for this to HULL users! I'd love to see what an automated approach looks like, feel free to submit a PR for something like that whenever you'd like 😃 |
Hi there,
I have a large catalogue of products +600 and are trying to change them all from Draft > Active through Shopify. However, due to an API limit HULL and Shopify are giving some issues.
Maybe there needs to be added some sort of queue to prevent this from happening, as this could easily also happen if two or more people are updating Shopify at the same time.
I found this link: https://help.apidrop.com/en/articles/5220902-shopify-platform-comunication-error-exceeded-2-calls-per-second-for-api-client-reduce-request-rates-to-resume-uninterrupted-service
The text was updated successfully, but these errors were encountered: