[BUG REPORT] Order Creation Web Hook Duplicates

Solved
Highlighted
Tourist
9 0 4

Hi Shopify,

 

I've been dealing with duplicate web hooks for Order Creation for a number of months now, but just last night, the frequency of the duplicate txs increased 100-fold. I received 1000s of duplicate Order Creation hooks from about 4am (GMT-06) until about 10am.  Really old orders too, like 12 hours old.  It overwhelmed my system, and I'd like to understand what happened and ensure it's prevented.  The contents of the duplicate web hook are usually identical to the previous (original hook), sometimes they contain a different updated_at time stamp (but the rest of the content is identical), and  some times they actually contain new information (like an updated email address). I've had to just ignore them, as it take too much of my processing power to parse and see if there are updates in any of them.  As I understand it though,  a different web hook should be sent with order updates. As of now, the flurry of web hooks has subsided, but I'm still seeing many duplicates about 1 min and 6s apart. My guess is that I'm dealing with two different problems.  The incident last night seems like a strange anomaly, and I wonder if the duplicates are my response time to a 200 http response?  How much time do I have to ack without seeing a duplicate? 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1040 139 165

This is an accepted solution.

Hey @phil-sebastian,

 

I wonder if the duplicates are my response time to a 200 http response?  How much time do I have to ack without seeing a duplicate? 

This could be one explanation. Webhooks expect a response within 5 seconds and will retry over 48 hours - here's more information on the retry frequency.

 

Are you able to provide example shop/app details?

0 Likes
Highlighted
Tourist
9 0 4

@scottydont wrote:

Hey @phil-sebastian,

 

I wonder if the duplicates are my response time to a 200 http response?  How much time do I have to ack without seeing a duplicate? 

This could be one explanation. Webhooks expect a response within 5 seconds and will retry over 48 hours - here's more information on the retry frequency.


Ok, this could be it then.  Profiling my code, my responses sometimes exceed 6 seconds.  However, when the duplicate is sent, my response is very fast (< 1s) though, since the order id is cached.   So, this would explain why I typically get only two web hooks.  Good to know the 5s metric. I'm sure I can tune my code to be less than that.  Thank you!  

1 Like