2012-03-26 28 views
0

我在運行服務器時遇到了一些長時間運行的請求。 它使用Apache2上的Phusion Passenger,並且我們有一個涉及正在生成的大報告的請求。最終用戶不可見,僅用於後端跟蹤,所以這個錯誤不會發生很多。就在這一個請求。 apache日誌是非常無益的報告:Phusion Passenger Rails Service在長時間運行的請求中不可用

[ 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上。

+0

你的apache超時設置爲? – nateleavitt 2012-03-26 20:23:00

+0

它被設置爲300 – 2012-03-27 00:14:07

回答

1

不知道你的具體設置或apache配置文件設置是什麼,我強烈建議你使用簡單的像delayed_job(https://github.com/collectiveidea/delayed_job)這樣的推送到後臺進程。那麼你將不會依賴Apache和Passenger。

+0

絕對有計劃,但我不確定是否有其他我應該看的東西。這實際上是所有的默認值減去虛擬主機。是否有任何額外的日誌設置可以用來確定它發生的原因? – 2012-03-26 22:30:58

+0

也許看看這部分的文檔:http://modrails.com/documentation/Users%20guide%20Apache.html#debugging%5Ffrozen – nateleavitt 2012-03-28 23:09:47

相關問題