Phusion Passenger Rails服务在长时间运行的请求中不可用

时间:2012-03-26 19:57:26

标签: ruby-on-rails apache2 passenger

我在服务器上运行长时间运行请求时遇到了一些问题。 它在Apache2上使用Phusion Passenger,我们有一个涉及生成大报告的请求。它对最终用户不可见,仅用于后端跟踪,因此此错误不会发生很多。就这一个要求而言。 apache日志只是非常无益的报告:

[ pid=10570 thr=140294434944864 file=ext/apache2/Hooks.cpp:783 time=2012-03-26 19:43:58.116 ]: Either the vistor clicked on the 'Stop' button in the web browser, or the visitor's connection has stalled and couldn't receive the data that Apache is sending to it. As a result, you will probably see a 'Broken Pipe' error in this log file. Please ignore it, this is normal. You might also want to increase Apache's TimeOut configuration option if you experience this problem often.

然而,没有破裂的管道。我没有失去连接,没有达到Apache超时(它在请求后大约30秒停止),而且我没有取消我的请求。

配置几乎都是默认配置,减去虚拟主机。这是在Ubuntu 11.04上。

1 个答案:

答案 0 :(得分:1)

在不知道您的特定设置或apache配置文件设置是什么的情况下,我强烈建议您使用delayed_job(https://github.com/collectiveidea/delayed_job)之类的简单内容将其推送到后台进程。那么你就不会依赖Apache和Passenger。