mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	Django lazy-loads much of its modules, including the application's. This defers the time to during the first request it serves. When doing rolling-restarts, this means that the worker is marked "ready" despite having multiple seconds more work to do. With small numbers of workers, this causes a significant capacity drop, since effectively more than one worker can be still reloading at a time. It also results in poor user experience for the requests which are unlucky enough to be served first. Use the technique detailed in the uwsgi documentation[^1] to fake a request during initial application load, which forces the application to be loaded. [^1]: https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#dealing-with-ultra-lazy-apps-like-django