我在 Digital Ocean VPS 上运行 Rails 4 应用程序,并且在特定 HTTP 请求上收到 Nginx 504 网关超时错误。所有请求都成功,但这个特定的请求没有。我在生产模式下运行,并且我的 Rails 日志中没有错误或异常。
Nginx 日志如下所示:
2014/04/23 05:08:22 [error] 6946#0: *109805 upstream timed out
(110: Connection timed out) while reading response header from upstream, client:
174.126.176.107, server: new.pilotpro.com, request:
"GET /dropbox/sync?right_now=1398115006.949 HTTP/1.1", upstream:
"http://127.0.0.1:8080/dropbox/sync?right_now=1398115006.949",
host: "new.pilotpro.com"
Unicorn 日志如下所示:
E, [2014-04-23T04:52:06.285058 #5424] ERROR -- : worker=1 PID:5429 timeout (61s > 60s), killing
E, [2014-04-23T04:52:06.297947 #5424] ERROR -- : reaped #<Process::Status: pid 5429 SIGKILL (signal 9)> worker=1
I, [2014-04-23T04:52:06.298207 #5424] INFO -- : worker=1 spawning...
I, [2014-04-23T04:52:06.299481 #5457] INFO -- : worker=1 spawned pid=5457
据我所知,除了请求超时之外没有任何问题。这仅仅是增加 Nginx 的超时限制的问题吗?
我会很感激任何建议。谢谢!