简体   繁体   English

Twilio sandbox webhook url返回超时执行错误

[英]Twilio sandbox webhook url returning timeout execution error

can anyone please tell me how to increase timeout for twilio sandbox http post url. 任何人都可以告诉我如何增加twilio沙箱http post url的超时。 I am trying to building one programmable chat application using whatsapp twilio sandbox using asp.net technology. 我正在尝试使用asp.net技术使用whatsapp twilio沙箱构建一个可编程聊天应用程序。 Normally my application methods takes 20 plus seconds to run but when i did same thing on twilio sandbox then its returning execution timeout error. 通常我的应用程序方法需要20多秒才能运行,但是当我在twilio沙箱上做同样的事情时,它的返回执行超时错误。 is there any way to increase timeout for twilio sandbox using .net. 有没有办法使用.net增加twilio沙箱的超时。

Twilio developer evangelist here. Twilio开发者传道者在这里。

The Twilio webhook timeout is 15 seconds and it can't be changed. Twilio webhook超时为15秒,无法更改。

Web applications that take 20+ seconds to respond to incoming requests are not recommended in general. 一般不推荐使用20秒以上响应传入请求的Web应用程序。 They ties up processes and resources on your server and may lead to other requests being dropped. 它们会占用服务器上的进程和资源,并可能导致其他请求被删除。

I would recommend you do whatever work that takes more than 20 seconds in a background worker outside of the main web process. 我建议你在主要网络流程之外的后台工作人员做任何超过20秒的工作。 You can then respond to the webhook quickly, with an empty response and then use the REST API to send your reply message once the work is done. 然后,您可以使用空响应快速响应webhook,然后完成工作后使用REST API发送回复消息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM