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" ??
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.
I see do we know the error count before they remove it or thats secret number
19 consectutive failures would see the webhook removed.
That info can be found in the webhook docs:
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.
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
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.