ansible-openwisp2
ansible-openwisp2 copied to clipboard
[bug] Supervisor reload takes too long
Reloading supervisor takes an excessive long time, I wonder if we can implement a more graceful reloading, uwsgi supports reloading with zero downtime by using the SIGHUP signal, we should investigate whether SIGHUP would reload also the other processes or not, if yes we can use just SIGHUP for everything, otherwise we can use SIGHUP only for uwsgi but other services can restart normally.
Right now we are restarting the whole supervisor service which can take up to a few minutes to complete, too slow and not suited for production.
I think we could switch from using "reload" to "update all" as suggested by @pandafy (please double check that) for any change to any of the service definitions handled by supervisor.
Then for any application related change (python dependency upgrades, django settings changes, etc.) we could add a new handler which sends the SIGHUP signal.