mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
Enabling `lazy-apps` defers loading of the uwsgi application until after the fork, instead of happening prior to forking workers[^1]. The nominal reason to not enable this is that it increases the memory footprint of the server (since no memory is shared across processes), and may slow down worker initialization, since each worker has to load the files from disk. However, Django defers loading the majority of the code until the first request[^2]. As such, our current non-`lazy-apps` gains nothing over `lazy-apps`. For consistency, switch to using `lazy-apps` for all deployments, rolling restart or no. [^1]: https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#preforking-vs-lazy-apps-vs-lazy [^2]: https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#preforking-vs-lazy-apps-vs-lazy