Using uWSGI lazy-apps to cut worker memory footprint
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.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
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.
uWSGI's cache2 directive caches full WSGI responses in-process, keyed by path and method. Here's a minimal setup, how to verify hits, and the staleness and key-collision traps to avoid.
Learn how to run multiple Python web apps from a single uWSGI Emperor, achieve zero‑downtime reloads, and keep your deployment simple and reliable.
Learn when to enable HTTP/2 in uWSGI, how to handle TLS requirements, and how to validate multiplexing to reduce head-of-line blocking in your Python applications.
Learn how uWSGI Emperor mode watches a directory of vassal configs to spawn, reload, and isolate multiple WSGI apps with zero‑downtime updates.
Learn how to use uWSGI's lazy-apps feature to reduce memory overhead in multi-app deployments by postponing application loading until the first request arrives.
Use uWSGI's cheaper subsystem to scale Python WSGI workers between a minimum and maximum. Configure master mode, workers, cheaper, cheaper-initial and cheaper-algo, then verify idle reduction and load scaling with logs or the stats server.
Learn how to use uWSGI's 'cheaper' subsystem to dynamically scale worker processes, reducing memory usage during idle periods while maintaining performance during traffic spikes.