Jani
Jani

Reputation: 1490

Unicorn is killed automatically

I'm using unicorn in a staging environment (Ubuntu), when a build process is started unicorn is killed automatically with the following logs.

I, [2014-09-23T06:59:58.912673 #16717]  INFO -- : reaped #<Process::Status: pid 16720 exit 0> worker=0
I, [2014-09-23T06:59:58.913144 #16717]  INFO -- : reaped #<Process::Status: pid 16722 exit 0> worker=1
I, [2014-09-23T06:59:58.913464 #16717]  INFO -- : master complete

I'm unable to locate why this is error is happening.

Upvotes: 0

Views: 428

Answers (1)

Holger Just
Holger Just

Reputation: 55758

It seems your unicorn server is gracefully shutdown by sending a SIGQUIT to the master process. In this case, the master process reaps all its worker processes after they have finished their current request and then shuts down itself. Unicorn supports a couple more signals to trigger certain behaviour (e.g. adding or removing workers, reloading itself, ...). You can lean more about that at the SIGNALS documentation of unicorn.

The SIGQUIT is probably caused by your deployment process which probably tries to reload/restart your unicorn but dies something strange. Generally, you should look at your unicorn init script or your deployment process for which signals are send (e.g by using the kill command).

Upvotes: 2

Related Questions