Unicorn工作人员间歇性地无故拖延

时间:2015-07-30 15:04:59

标签: ruby-on-rails ruby nginx unicorn

我在Ubuntu上使用标准的Ruby on Rails应用程序运行Unicorn。我遇到的问题是间歇性地我的独角兽进程将无缘无故地超时。

相同的请求将在90%的时间内工作,并在其他10%的时间内超时。

Rails日志看起来像这样

2015-07-30 14:33:52,519 DEBG 'web' stdout output:
Jul 30 14:33:52 3f48d861780b rails[148]: Started GET "/request_url" for 00.00.00.00 at 2015-07-30 14:33:52 +0000
2015-07-30 14:34:23,257 DEBG 'web' stderr output:
E, [2015-07-30T14:34:23.252900 #18] ERROR -- : worker=4 PID:148 timeout (31s > 30s), killing
E, [2015-07-30T14:34:23.256257 #18] ERROR -- : reaped #<Process::Status: pid 148 SIGKILL (signal 9)> worker=4
2015-07-30 14:34:23,261 DEBG 'web' stderr output:
I, [2015-07-30T14:34:23.261294 #215]  INFO -- : worker=4 ready

nginx error.log显示此错误:

2015/07/30 14:20:43 [error] 2368#0: *365 upstream prematurely closed connection while reading response header from upstream, client: 00.00.00.00, server: ~^(www\.)?(.+)$, request: "GET /request_url HTTP/1.1", upstream: "http://00.00.00.00:5000/request_url", host: "myapp.com"

有谁知道造成这种情况的原因是什么?

0 个答案:

没有答案
相关问题