What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Webhook orders/updated failing

Webhook orders/updated failing

Hemlata
Tourist
11 0 0

Hii,

I have used orders/updated webhook in my app. I am getting below error emails for some users. 

So please let me know how to resolve this issue.

Your webhook for orders/updated at https://myserver.com/webhook/webhookOrder.php is failing to return a successful response.
This webhook has been attempted 9 times. If your webhook continues to fail, it will be removed and your application will not receive any more notifications.

Recent failures: July 1, 2020 at 11:08 am Error: read tcp 10.228.170.240:41330->69.197.154.251:443: i/o timeout

Replies 6 (6)

mikedasilva
Shopify Staff (Retired)
61 7 13

Hi,

In general, when you receive that error it's because we weren't able to reach the configured host within a certain amount of time. You can learn more about our webhook frequencies and retries here: https://shopify.dev/tutorials/manage-webhooks#frequency

Getting that email indicates we still had connection issues even after multiple attempts.

Cheers,

Mike

 

To learn more visit the Shopify Help Center or the Community Blog.

_JB
Shopify Staff (Retired)
836 100 223

Hey @Hemlata,

This means your server isn't responding to the webhook on time. Shopify requires that you respond with a 200 status code within 5 seconds, otherwise we consider that webhook delivery failed and schedule a retry. If delivery fails multiple times in a row, the webhook is automatically deleted. See our docs here for full details.

JB | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Hemlata
Tourist
11 0 0

Thank you so much for the helpful reply.

Please let me know, is there need to make any changes in code or need to increase server speed? 

_JB
Shopify Staff (Retired)
836 100 223

Hey @Hemlata,

You'll need to make changes in your code to ensure your app responds with a 200 - OK within 5 seconds of receiving the webhook. 

JB | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Hemlata
Tourist
11 0 0

Hey @_JB 

I have added condition in PHP file, if app not respond within 5 sec code exit. I have checked file respond within 1 sec and added condition also if some parameters have blank or not, but still getting this error. Please let me know another solution.
 

 

 

Hemlata
Tourist
11 0 0

Error resolved now. Actually I have used a function for tracking record, this function have sleep time, so response took time more than 5 sec for those orders who entered in this tracking function.