Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anicorn doesn't understand stale PID file #10

Closed
vassilevsky opened this issue Feb 10, 2018 · 1 comment
Closed

Anicorn doesn't understand stale PID file #10

vassilevsky opened this issue Feb 10, 2018 · 1 comment
Assignees

Comments

@vassilevsky
Copy link
Contributor

Hi 👻

I had a small problem with PID file. Maybe you'll want to add anti-measures.

Server was turned off. Unicorn left behind a PID file. It was invalid. But Anicorn kept trying to work with it:

[ 2018/02/10 20:14:03 ] [WARN] Looks like Unicorn is down. Restarting...
[ 2018/02/10 20:14:03 ] Unicorn already works, restarting...
[ 2018/02/10 20:14:03 ] Restarting Unicorn (PID: 3577)...
/usr/bin/anicorn: line 210: kill: (3577) - No such process
[ 2018/02/10 20:14:19 ] [ERROR] Can't restart Unicorn
[ 2018/02/10 20:14:24 ] [WARN] Looks like Unicorn is down. Restarting...
[ 2018/02/10 20:14:24 ] Unicorn already works, restarting...
[ 2018/02/10 20:14:24 ] Restarting Unicorn (PID: 3577)...
/usr/bin/anicorn: line 210: kill: (3577) - No such process
[ 2018/02/10 20:14:40 ] [ERROR] Can't restart Unicorn
[ 2018/02/10 20:14:45 ] [WARN] Looks like Unicorn is down. Restarting...
[ 2018/02/10 20:14:45 ] Unicorn already works, restarting...
[ 2018/02/10 20:14:45 ] Restarting Unicorn (PID: 3577)...
/usr/bin/anicorn: line 210: kill: (3577) - No such process
[ 2018/02/10 20:15:01 ] [ERROR] Can't restart Unicorn

I was able to break this cycle only by manually removing the PID file. After that Anicorn did everything correctly:

[ 2018/02/10 20:15:48 ] [WARN] Looks like Unicorn is down. Restarting...
[ 2018/02/10 20:15:48 ] Starting Unicorn...
[ 2018/02/10 20:16:04 ] Unicorn successfully started (PID: 31271)

Hope this helps!

@andyone
Copy link
Member

andyone commented Feb 10, 2018

Fix released as part of 2.1.2 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants