Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

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 12

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
836 100 222

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
836 100 222

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.