[Supervisor-users] Zero downtime upgrade

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Supervisor-users] Zero downtime upgrade

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
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Reply | Threaded
Open this post in threaded view
|

Re: [Supervisor-users] Zero downtime upgrade

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

On 10 November 2017 at 14:34, Yuriy Zhilovets <[hidden email]> wrote:
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
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users




--

_______________________________________________
Supervisor-users mailing list
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Reply | Threaded
Open this post in threaded view
|

Re: [Supervisor-users] Zero downtime upgrade

Gustavo Carneiro
In reply to this post by Yuriy Zhilovets


On 10 November 2017 at 12:34, Yuriy Zhilovets <[hidden email]> wrote:
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)
 

Yuriy Zhilovets


_______________________________________________
Supervisor-users mailing list
[hidden email]
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

_______________________________________________
Supervisor-users mailing list
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Reply | Threaded
Open this post in threaded view
|

Re: [Supervisor-users] Zero downtime upgrade

Yuriy Zhilovets
Nice solution. Thank you, Gustavo.

2017-11-10 20:42 GMT+03:00 Gustavo Carneiro <[hidden email]>:


On 10 November 2017 at 12:34, Yuriy Zhilovets <[hidden email]> wrote:
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)
 


_______________________________________________
Supervisor-users mailing list
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Reply | Threaded
Open this post in threaded view
|

Re: [Supervisor-users] Zero downtime upgrade

Yuriy Zhilovets
In reply to this post by Mikko Ohtamaa
Sounds reasonable. Following your advice, I have made Ansible to send USR2 to the working process. Thanks.

2017-11-10 15:54 GMT+03:00 Mikko Ohtamaa <[hidden email]>:
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

On 10 November 2017 at 14:34, Yuriy Zhilovets <[hidden email]> wrote:
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
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users