I am new to Shopify. I have created one app in which I have registered webhooks via API and also some cron is created to fetch data on a daily basis which calls to Shopify and fetch data. Now after making live my app, i am getting emails on a daily basis for webhook failure. I cannot get what is happening over there. Only I can see it the time of failure and i/o timeout message. Can anyone please tell me what is the reason behind it. This happens randomly. Not every time I got this mails. I did google but cannot get any proper answers. Is this problem is server related or not?
Please help me. Please Guide me how to solve these errors.
Are you ensuring to respond with a 200 status immediately? If you are performing some action, and only once it is completed you are responding with 200 ok, then it's possible for us to count the webhook as not received.
I'd recommend replying to the webhook and performing any tasks you need to based on the receipt of the webhook asynchronously.
Let me know if that's not the issue and we can revisit.
I have this same issue. My app has over 100 different shops connected to it but there are about 7 shops that receive timeout errors. The 200 response is sent back within less than a second and there are no errors as far as I can tell on my side. The fact that it's only a certain subset of shops that get this error makes me think there is some setting in the shop that causes this, not an error in my code.
Any ideas what could cause this to happen or what I could try in order to debug it?
Hi, same issue here
The warning is:
Error: read tcp 10.60.42.177:37044->77.x.x.86:443: i/o timeout
But logs show a 200 is returned each time.
Reinstalling the webhook helps for a while, and then the errors return. But not for every webhook.
I found that Shopify only has a 5 second time-out.
So maybe immediately send a 200 OK response, and process the webhook asynchronous to solve this issue.
I hope this helps.
I agree, it only happened in one shop in my case. The problem also disappeared before I had time to fix the response time. Maybe there is an added network delay from certain Shopify servers that provide certain shops (across the ocean?)