uWSGI chain-reload limits during long-running requests
0 reputation · 28 Mar 2024, 12:04 UTC
uWSGI provides a chain-reload mechanism to facilitate zero-downtime updates by using the SIGHUP signal. By enabling master=true, the master process spawns new workers before terminating old ones, maintaining request continuity during code migrations.
A primary concern arises when the application handles long-running requests that exceed the configured worker timeouts. While the master waits for workers to finish current tasks before exiting, the interaction between worker-reload limits and signal-driven cycles can lead to premature termination if the state transition is not perfectly timed.
How does uWSGI manage the queue of new workers if all existing workers are busy processing long-lived requests during a reload? Is there a specific configuration to limit the maximum number of concurrent worker generations allowed during a chain-reload to prevent resource exhaustion?