uWSGI Emperor Vassal Reloads: Signal Boundaries and Deploy Safety
Use SIGUSR2 to the uWSGI emperor, not SIGTERM to vassals, for zero-downtime code deploys. Verify with the stats endpoint before and after.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Use SIGUSR2 to the uWSGI emperor, not SIGTERM to vassals, for zero-downtime code deploys. Verify with the stats endpoint before and after.
When uWSGI workers hang, use the stats server to spot frozen workers, check harakiri logs, and monitor memory. Tweak harakiri, enable graceful reloads, and adjust the cheaper strategy to keep your app responsive.
uWSGI Emperor lets you run multiple isolated Python apps on one host through a single file-watched master, with per-app users and graceful reloads triggered by touching config files.
Flask's built‑in development server handles one request at a time and exposes an interactive debugger that allows arbitrary code execution. Production deployments need Gunicorn, uWSGI, or similar WSGI servers instead.
Decide when to use a fixed uWSGI worker pool versus the cheaper dynamic scaling subsystem for Python WSGI apps.
Prevent unresponsive Python workers by implementing uWSGI master mode and harakiri timers to automatically detect and restart stalled processes.
Run one WSGI app under uWSGI Emperor with cheaper autoscaling, lazy-apps, harakiri, and Nginx. Includes vassal configuration, load testing, and recovery steps.
Learn how enabling lazy-apps defers Python import until the first request, reducing per‑worker RSS and when to watch out for fork‑unsafe code.
Manage multiple isolated Python applications on a single host using uWSGI Emperor mode. Learn how to configure vassals, secure the supervisor, and monitor your fleet.