Webhook Timeout Tip

My webhooks were getting paused after failing across all 8 retries.

I was getting a timeout error in the response.

It’s not in the documentation, but you have 10 seconds to response to the webhook with the 200 response so they know it was successful. I didn’t realize and was doing a lot of backend processing of that data so I have a few responses coming at 10-15 seconds. I’ve since split storing and processing the data.

Thought this may be a helpful tip for those working on webhooks and wanted to share.

1 Like

Yes, but that’s generally the case with webhooks, you should provide an answer as quickly as possible and not execute a lot of logic.

I personally have a Symfony application and when a webhook comes in, I create a message in the message queue and then I give the response directly. The logic then happens when the message handler processes the message.

1 Like

Yes, like momocode says, you should immediately save the webhook payload and info somewhere on your side and return 200 to the webhook request. Then you can process the payload you saved via a queue etc.