我部署Rails應用程序nginx的和乘客,還有很長的運轉軌道的行動,這樣的事情:是nginx的超時或軌道超時
def handler
sleep 100
respond_to do |format|
format.json { render :json=>{:success=>true}}
end
end
然而,Nginx的錯誤日誌打印此消息:
Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
顯然,通過單擊停止按鈕不會調用此錯誤。也許nginx超時或超時或超時,如何解決這個問題,是否可以通過配置文件來解決。有沒有什麼幫助
Rails沒有請求超時。我認爲這是enginx你的情況:http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_connect_timeout或http://www.nginxtips.com/504-gateway-time-out-using-nginx/ – DiegoSalazar 2014-09-30 15:28:18
這是因爲您使用乘客內置的Nginx模塊,通過上游配置開始使用獨立進程,問題應該修復。 – Anatoly 2014-10-01 10:41:30
thx,我找到了原因,我使用extjs Ajax請求前面,默認超時是30秒。 – 2014-10-02 03:05:36