Skip to content

Commit

Permalink
Add note about Zerg fds having to be Unix sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Jan 4, 2013
1 parent 9d2f3eb commit 8b77d88
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2427,6 +2427,7 @@ Chdir to specified directory after apps loading.
Set lazy mode (load apps in workers instead of master).

This option may have memory usage implications as Copy-on-Write semantics can not be used.
When ``lazy`` is enabled, only workers will be reloaded by uWSGI's reload signals; the master will remain alive. As such, uWSGI configuration changes are not picked up on reload by the master.

.. _OptionLazyApps:

Expand All @@ -2436,6 +2437,9 @@ This option may have memory usage implications as Copy-on-Write semantics can no

Load apps in each worker instead of the master.

This option may have memory usage implications as Copy-on-Write semantics can not be used.
Unlike ``lazy``, this only affects the way applications are loaded, not master's behavior on reload.

.. _OptionCheap:

``cheap``
Expand Down
2 changes: 2 additions & 0 deletions Zerg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Enabling the zerg server

If you want an uWSGI instance to be rushed by zerg, you have to enable the Zerg server. It will be bound to an UNIX socket and will pass uwsgi socket file descriptors to the Zerg workers connecting to it.

.. warning:: The socket must be an UNIX socket because it must be capable of passing through file descriptors. A TCP socket simply will not work.

For security reasons the UNIX socket does not inherit the ``chmod-socket`` option, but will always use the current umask.

If you have filesystem permission issues, on Linux you can use the UNIX sockets in abstract namespace, by prepending an ``@`` to the socket name.
Expand Down
4 changes: 2 additions & 2 deletions _options/optdefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ def core_options():
with config.section("Application loading") as s:
s.o("chdir", str, "chdir to specified directory before apps loading")
s.o("chdir2", str, "chdir to specified directory after apps loading")
s.o("lazy", True, "set lazy mode (load apps in workers instead of master)", help="This option may have memory usage implications as Copy-on-Write semantics can not be used.")
s.o("lazy-apps", True, "load apps in each worker instead of the master")
s.o("lazy", True, "set lazy mode (load apps in workers instead of master)", help="This option may have memory usage implications as Copy-on-Write semantics can not be used.\nWhen ``lazy`` is enabled, only workers will be reloaded by uWSGI's reload signals; the master will remain alive. As such, uWSGI configuration changes are not picked up on reload by the master.")
s.o("lazy-apps", True, "load apps in each worker instead of the master", help="This option may have memory usage implications as Copy-on-Write semantics can not be used.\nUnlike ``lazy``, this only affects the way applications are loaded, not master's behavior on reload.")
s.o("cheap", True, "set cheap mode (spawn workers only after the first request)")
s.o("cheaper", int, "set cheaper mode (adaptive process spawning)", help="""This an advanced `cheap` mode. This will only spawn <n> workers on startup and will use various (pluggable) algorithms to implement adaptive process spawning.""")
s.o("cheaper-initial", int, "set the initial number of processes to spawn in cheaper mode")
Expand Down

0 comments on commit 8b77d88

Please sign in to comment.