Reputation: 11
When an API call is made after receiving an SMS via Twilio, I occasionally get the error below -
Error: Total timeout is triggered. Configured tt is 15000ms and we attempted 1 time(s)
The API call occasionally takes longer than 15 seconds to return a response (this is due to having to process the SMS etc.). How can I configure the total timeout to say 25000ms?
Upvotes: 0
Views: 3171
Reputation: 1
Twilio has a maximum total timeout of 15 seconds.
A solution would be responding a empty twiML with 202 status code and then proceed with the processing the message and finally sending an HTTP POST request to Twilio’s Messages API resource. See Receive incoming messages without sending a reply in Twilio docs here
Twilio's solution to this error code of 11200 is stated here. See the last bullet point. ERROR 11200
Upvotes: 0
Reputation: 2942
just time it yourself and send messages using their twilio client if timed out
Upvotes: -1
Reputation: 73090
It is possible to override the timeout settings for a webhook. However, the maximum total time (tt) for webhooks is 15 seconds and you cannot increase it beyond there.
If you find your service cannot respond within that time, you might want to hand off the processing of the SMS to a job and respond to the webhook quicker. If you then intend to reply to the SMS, you can do so using the REST API message resource instead of TwiML.
Upvotes: 1