我的应用程序是基于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.