#daniel_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1367140325084102769
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there ๐ sorry if I overlooked it, but I don't see a question in your post, so please let me know if this doesn't answer what you were trying to ask.
Unfortunately, I don't have much insight to offer here, since the code causing the delay runs on your servers where we don't have visibility.
Your webhook endpoint is still taking more than 20 seconds to respond to our requests, so they're timing out. I'm not sure what the script you referred to does, but if there is any chance it does a task that takes a long time to process (such as making API calls or updating a database) then you'll want to respond to us before you call your script.
Hi @worn thorn thanks for getting back to me on this.
I've tried to optimise the webhook script as much as possible by doing a PHP exec file which does all the API calls in a separate file to avoid any blocking, so the code is
- PHP exec file
- http_response_code(200);
the timeout issue happens is very intermittent (1 a day)
Hi taking over here as toby has to step away soon
Not super familiar with PHP, but is there a way to async process the webhook events? Is that what the above is doing? ie. implement a job queue and just queue up the event processing and return a 200 immediately after queing the event. That should make your responses very quick.