Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

uwsgi: Always enable lazy-apps.

Alex Vandivera6d5d7740ee1
diff --git a/puppet/zulip/templates/uwsgi.ini.template.erb b/puppet/zulip/templates/uwsgi.ini.template.erb
index c6e2b4cc79e..5e1195b24c1 100644
--- a/puppet/zulip/templates/uwsgi.ini.template.erb
+++ b/puppet/zulip/templates/uwsgi.ini.template.erb
@@ -9,8 +9,19 @@ gid=zulip
# Where the main application is located
chdir=/home/zulip/deployments/current/
+
+# lazy-apps means that the application is loaded after forking (and
+# thus chdir'ing). This lets us do rolling restarts into new
+# versions.
+# https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#preforking-vs-lazy-apps-vs-lazy
+lazy-apps=true
+
+# Entrypoint of the application
module=zproject.wsgi:application
+
+
+
# Start a master process listening on this socket
master=true
chmod-socket=700
@@ -58,10 +69,6 @@ stats=/home/zulip/deployments/uwsgi-stats
# directory in each forked process
hook-post-fork=chdir:/home/zulip/deployments/current
-# lazy-apps are required for rolling restarts:
-# https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#preforking-vs-lazy-apps-vs-lazy
-lazy-apps=true
-
<% end -%>