gpt4 book ai didi

ruby-on-rails - 如何更改 Heroku 上的默认请求超时?

转载 作者:行者123 更新时间:2023-12-03 00:42:51 26 4
gpt4 key购买 nike

我的应用程序是在 Rails 上构建的,我的生产服务器在 Heroku 上。

我的应用程序主要用于文件上传和文件处理,处理请求需要超过 50 秒。根据 Heroku 配置,我的请求没有及时响应,并且由于请求超时,它会将我发送到应用程序错误页面。

如何更改 Heroku 上的请求超时配置?

请帮助我使应用程序正常运行。

最佳答案

根据Heroku's documentation这是不可能的

The timeout value is not configurable. If your server requires longer than 30 seconds to complete a given request, we recommend moving that work to a background task or worker to periodically ping your server to see if the processing request has been finished. This pattern frees your web processes up to do more work, and decreases overall application response times.

关于ruby-on-rails - 如何更改 Heroku 上的默认请求超时?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21749396/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com