Sean Grove
2011-Jan-24 01:09 UTC
Unicorn renaming unicorn.pid.oldbin back to unicorn.pid (or, is unicorn afraid to die?)
Whenever I send a USR2 signal to unicorn, it correctly renames the pid file from unicorn.pid to unicorn.pid.oldbin, and a new instance starts launching. However, almost immediately (~2 seconds), it renames it back to unicorn.pid. The new instance of unicorn finished launching to find that unicorn.pid is already running, and refuses to start up. I''m not sure if I''ve misconfigured something, but I''d love to get to the bottom of this! Thanks for the help! All the best, Sean Grove
Eric Wong
2011-Jan-24 19:09 UTC
Unicorn renaming unicorn.pid.oldbin back to unicorn.pid (or, is unicorn afraid to die?)
Sean Grove <otokorasii at gmail.com> wrote:> Whenever I send a USR2 signal to unicorn, it correctly renames the pid > file from unicorn.pid to unicorn.pid.oldbin, and a new instance starts > launching. However, almost immediately (~2 seconds), it renames it > back to unicorn.pid. The new instance of unicorn finished launching to > find that unicorn.pid is already running, and refuses to start up. > > I''m not sure if I''ve misconfigured something, but I''d love to get to > the bottom of this!Are you somehow clearing the UNICORN_FD environment variable in your master process (perhaps when you load your app). Which version of Ruby are you using? What does your stderr log say? -- Eric Wong