Webhook i/o timeout failure

dhara-pawar
Shopify Partner
9 0 1

Hello all,

 

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.

0 Likes
Busfox
Shopify Staff
Shopify Staff
619 48 94

Hi @dhara-pawar,

 

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.

 

 

0 Likes
cyberdynist
Tourist
5 0 1

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?

 

0 Likes
JonathanEsign
Tourist
7 1 2

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.

 

Best,

Jonathan

0 Likes
Anatoly_S
Shopify Partner
8 0 1

Hello!

I have same problem.

Did you manage to fix it?

0 Likes
cyberdynist
Tourist
5 0 1
Nope - I just had to put a system in place that would receive the email
notification, turn around and launch a process that immediately re-adds the
webhook. Since there's nothing actually wrong with the webhook and Shopify
doesn't penalize you for doing this, the system works. It is a dumb
workaround though when the problem should be fixed.
Anatoly_S
Shopify Partner
8 0 1

Thank you!

0 Likes
JonathanEsign
Tourist
7 1 2

Hi Anatoly_S

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.

Jonathan

0 Likes
Anatoly_S
Shopify Partner
8 0 1

I checked all request, and was processed in 1-3 sec. 

0 Likes
cyberdynist
Tourist
5 0 1
I do actually start by returning a 200 immediately and then continue
processing the request. That is the strange part. It's literally less
than a second every time. Not only that, it appears to only happen for
certain shops. We have several hundred shops that we service and this
timeout doesn't happen randomly across all of them. It only happens for a
handful of shops but for those shops it happens consistently. Almost as
though there's something about their Shopify settings or perhaps the
Shopify server they are sitting on that causes things to hang. This is a
super frustrating bug and thus far there has been no resolution that I've
found for it.

0 Likes