Unicorn work time out for no reason with interruptions

I am running Unicorn with a standard Ruby on Rails application on Ubuntu. The problem I'm having is that with interruptions, my unicorn processes expire for no reason.

The same query will work 90% of the time and the other 10% of the time.

The Rails log looks like this:

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 shows this error:

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"

      

Does anyone know what could be causing this?

+3


source to share





All Articles