Have your say in Community Polls: What was/is your greatest motivation to start your own business?
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 goes missing

Webhook goes missing

Xavier_Lee
Shopify Partner
10 0 0

Hi Guys, this strange situation has been going on for awhile.

I've got about 6 webhooks configured on our shopify store basically to sync orders and products so that we could do our own reporting. Everything was working fine untill at times some of the webhooks were "deleted/missing/removed". So we had to recreate the webhook again on the notifications. This has been going on for weeks now.

Anybody know why webhooks could be "deleted/missing/removed" ??

 

| Jumpstart - Shopify Experts as a service | https://jumpstartcommerce.com/ |
Replies 7 (7)

HunkyBill
Shopify Partner
4853 60 568

If your webhook does not respond with a 200 OK, Shopify counts the sent webhook as an error. Enough of those and Shopify removes the webhook. As a courtesy, the email of the account that setup the webhook gets notice of the errors, and the potential removal, as well as notice the webhook was removed. 

Perhaps those emails are in your spam/junk bin and so you're unaware of the errors from that perspective. Your own internal logs should also be showing errors, assuming that is the problem. 

Note that webhooks going bad can be due to a single attribute of whatever it is you're looking at being unhandled by your code, and thus triggering an error you otherwise don't think exists. For example, you might assume an order has a customer, but it might not. And when Shopify repeats the send on the webhook, the error count rises.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com

Xavier_Lee
Shopify Partner
10 0 0

I see do we know the error count before they remove it or thats secret number

| Jumpstart - Shopify Experts as a service | https://jumpstartcommerce.com/ |

Jason
Shopify Partner
11206 226 2315

19 consectutive failures would see the webhook removed.

That info can be found in the webhook docs:
https://help.shopify.com/api/tutorials/webhooks#respond-to-webhook

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★

Xavier_Lee
Shopify Partner
10 0 0

Thanks Jason!

| Jumpstart - Shopify Experts as a service | https://jumpstartcommerce.com/ |

Pogodan
Shopify Partner
76 0 13

Jason maybe you can confirm - we've seen situations with a high webhook volume where it seems to get uninstalled quite rapidly. Is there any minimum failure time, or e.g. if a bulk product update causes 200 webhooks in 5 seconds and our server request queue backs up and 20 requests fail (which can just be failure to respond within 5 seconds), will that cause a near-instant webhook removal?

I realize a webhook for an individual event is retried with an increasing backoff time, but does this apply to multiple webhooks for separate events, and do those webhooks all count towards the 19-failure limit? It might be helpful for Shopify to clarify how this works in practice.

Pogodan | https://experts.shopify.com/pogodan-dev

Xavier_Lee
Shopify Partner
10 0 0

Hi Pogodan, we came into this issue recently too as we had over 1000 products so we had to do a batch call, delaying every 30mins if not the webhook gets remove automatically

| Jumpstart - Shopify Experts as a service | https://jumpstartcommerce.com/ |

Pogodan
Shopify Partner
76 0 13

Yeah, we wound up rewriting our webhook handler from Rails to Phoenix (Elixir), which finally handles the load spikes (seems to be mainly bulk product updates) well enough to avoid any uninstalls.

Pogodan | https://experts.shopify.com/pogodan-dev