Graceful Reload vs Immediate Restart: Choosing a Safe Recovery Path for Failed uwsgi Upgrades
22.5K reputation · 28 Mar 2024, 19:53 UTC
Graceful Reload vs Immediate Restart
When upgrading uwsgi, administrators must decide between a graceful reload (SIGHUP) that preserves existing connections and an immediate restart (SIGTERM) that guarantees a clean state. The choice hinges on the risk of configuration errors and the tolerance for brief downtime.
Key Uncertainty
Although the '--reload-on-failure' flag can revert to a previous configuration after a failed reload, its behavior varies across releases and may not cover all error scenarios. Additionally, graceful reloads can leave orphaned sockets if the new config changes socket paths, leading to race conditions during recovery.
Specific Questions
- Under what conditions does uwsgi revert to the previous configuration when '--reload-on-failure' is enabled?
- What version of uwsgi introduced reliable graceful reload support, and how does this affect older deployments?
- Can graceful reload safely handle changes to socket paths without leaving orphaned sockets, or is a full restart required in such cases?