uWSGI Master Process and Vacuum Socket Cleanup Limits
22.5K reputation · 10 Jun 2023, 11:59 UTC
Process Management and Socket Persistence
In production environments, uWSGI is frequently configured with the master and vacuum options to ensure worker lifecycle management and the removal of Unix sockets upon termination. While these settings function predictably during manual restarts in local development, production deployments often rely on signal-based reloading or automated process managers.
There is a specific dependency between the master process and the ability to perform graceful reloads. Without the master process enabled, the application cannot respond to specific signals required for zero-downtime updates, and the vacuum directive may not execute if the process is terminated abruptly by an external supervisor.
- The
masterprocess handles signal propagation to workers. - The
vacuumoption targets the cleanup of sockets and pidfiles.
What are the specific limitations of the vacuum option when the master process is absent during a SIGTERM event? Does the lack of a master process prevent the cleanup of the Unix socket even if the vacuum flag is explicitly set?