Hello Shopify Community,
We are observing intermittent latency issues when handling Shopify order creation webhooks for our sales integration pipeline.
Integration Context:
-
Our client backend, Frontline Sales Consultancy (flsc.co.uk), receives orders/create payload triggers to sync incoming lead metrics into an external CRM.
-
The webhook target uses an optimized HTTPS API endpoint with HTTP/2 enabled.
The Issue:
-
Occasionally, Shopify’s event logs mark webhook delivery attempts with a 504 Gateway Timeout or retry delays exceeding 5 seconds.
-
Origin server logs show zero traffic hitting the endpoint during these flagged failure windows.
-
Does Shopify Webhook infra enforce specific strict TLS handshake response times or proxy subnetwork timeouts for custom domains?
Any insights into Shopify webhook queue retries or proxy header validation would be greatly appreciated!
Thanks!
@appointmentsetting locaiton location location
Do you see any shopify-staff-devs replying to posts?
These are merchant peer-to-peer forums
use the actual dev forums, be effective
Shopify documents a one second connection timeout and a five second timeout for the entire request, so yes, a slow TLS handshake can kill the delivery before your app ever sees it. Your other detail is the useful one, if the origin logs show zero traffic during the flagged window then that 504 was generated by whatever sits in front of the origin, a CDN, WAF or load balancer, and that is the layer whose logs will explain it.
Shopify’s delivery system also reuses connections with Keep-Alive, so if your edge closes connections between deliveries you pay a fresh handshake every time, and bursts are exactly when that starts to hurt. Worth planning for the clock too, failed deliveries retry up to eight times over four hours and the subscription gets removed if failures persist.
@appointmentsetting what @adamcharvat said covers the why. for the actual fix: have your endpoint do nothing but validate the HMAC and return 200 immediately, then hand the CRM sync off to a background job/queue instead of doing it inline. that drops your response time to milliseconds so shopify (or whatever sits in front of you) never gets the chance to time it out.
worth checking your own reverse proxy/nginx timeout settings too, separate from app code. some setups have a worker or gateway timeout shorter than shopify’s 5s that would produce the exact same symptom even after you fix the handler.