Discussion:
[Supervisor-users] Zero downtime upgrade
Yuriy Zhilovets
2017-11-10 12:34:40 UTC
Permalink
Hi everybody!

Some servers (e.g. Nginx, Perl Hypnotoad) has so called zero downtime
upgrade. Some signal, e.g. USR2, causes a server to reload himself
gracefully, not losing existing connections.

How to teach a Supervisord to do "supervisorctl restart xxx" in this way?

Yuriy Zhilovets
Mikko Ohtamaa
2017-11-10 12:54:14 UTC
Permalink
Hi Yuriy,

What I do is that I let supervisord to do the real hard restart.

When I need zero downtime restart, I'll send the signal by hand. In my case
I use uWSGI "chained reload" through a touch file.

Sometimes one still needs to do a hard restart in the case of reliability
issues and it is handy to have this functionality available.

-Mikko
Post by Yuriy Zhilovets
Hi everybody!
Some servers (e.g. Nginx, Perl Hypnotoad) has so called zero downtime
upgrade. Some signal, e.g. USR2, causes a server to reload himself
gracefully, not losing existing connections.
How to teach a Supervisord to do "supervisorctl restart xxx" in this way?
Yuriy Zhilovets
_______________________________________________
Supervisor-users mailing list
https://lists.supervisord.org/mailman/listinfo/supervisor-users
--
Mikko Ohtamaa
http://opensourcehacker.com
http://twitter.com/moo9000
Yuriy Zhilovets
2017-11-14 18:42:47 UTC
Permalink
Sounds reasonable. Following your advice, I have made Ansible to send USR2
to the working process. Thanks.
Post by Mikko Ohtamaa
Hi Yuriy,
What I do is that I let supervisord to do the real hard restart.
When I need zero downtime restart, I'll send the signal by hand. In my
case I use uWSGI "chained reload" through a touch file.
Sometimes one still needs to do a hard restart in the case of reliability
issues and it is handy to have this functionality available.
-Mikko
Post by Yuriy Zhilovets
Hi everybody!
Some servers (e.g. Nginx, Perl Hypnotoad) has so called zero downtime
upgrade. Some signal, e.g. USR2, causes a server to reload himself
gracefully, not losing existing connections.
How to teach a Supervisord to do "supervisorctl restart xxx" in this way?
Yuriy Zhilovets
Gustavo Carneiro
2017-11-10 17:42:28 UTC
Permalink
Post by Yuriy Zhilovets
Hi everybody!
Some servers (e.g. Nginx, Perl Hypnotoad) has so called zero downtime
upgrade. Some signal, e.g. USR2, causes a server to reload himself
gracefully, not losing existing connections.
How to teach a Supervisord to do "supervisorctl restart xxx" in this way?
kill -USR2 $(supervisorctl pid xxx)
Post by Yuriy Zhilovets
Yuriy Zhilovets
_______________________________________________
Supervisor-users mailing list
https://lists.supervisord.org/mailman/listinfo/supervisor-users
--
Gustavo J. A. M. Carneiro
Gambit Research
"The universe is always one step beyond logic." -- Frank Herbert
Yuriy Zhilovets
2017-11-14 18:40:25 UTC
Permalink
Nice solution. Thank you, Gustavo.
Post by Gustavo Carneiro
Post by Yuriy Zhilovets
Hi everybody!
Some servers (e.g. Nginx, Perl Hypnotoad) has so called zero downtime
upgrade. Some signal, e.g. USR2, causes a server to reload himself
gracefully, not losing existing connections.
How to teach a Supervisord to do "supervisorctl restart xxx" in this way?
kill -USR2 $(supervisorctl pid xxx)
Continue reading on narkive:
Loading...