Skip to content

Commit

Permalink
Tweak WorkerTmpDir docs
Browse files Browse the repository at this point in the history
  • Loading branch information
berkerpeksag committed Dec 22, 2016
1 parent 9a9e3ac commit 8fe132b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docs/source/faq.rst
Expand Up @@ -161,6 +161,8 @@ How do I fix Django reporting an ``ImproperlyConfigured`` error?
With asynchronous workers, creating URLs with the ``reverse`` function of
``django.core.urlresolvers`` may fail. Use ``reverse_lazy`` instead.

.. _blocking-os-fchmod:

How do I avoid Gunicorn excessively blocking in ``os.fchmod``?
--------------------------------------------------------------

Expand Down
8 changes: 8 additions & 0 deletions docs/source/settings.rst
Expand Up @@ -376,6 +376,14 @@ A directory to use for the worker heartbeat temporary file.

If not set, the default temporary directory will be used.

.. note::
The current heartbeat system involves calling ``os.fchmod`` on
temporary file handlers and may block a worker for arbitrary time
if the directory is on a disk-backed filesystem.

See :ref:`blocking-os-fchmod` for more detailed information
and a solution for avoiding this problem.

user
~~~~

Expand Down
11 changes: 7 additions & 4 deletions gunicorn/config.py
Expand Up @@ -982,10 +982,13 @@ class WorkerTmpDir(Setting):
If not set, the default temporary directory will be used.
Warning: the current heartbeat system involves calling ``os.fchmod`` on
temporary file handlers and may block a worker for arbitrary time if the
directory is on a disk-backed filesystem. See the :ref:`faq` for more
detailed information and a solution for avoiding this problem.
.. note::
The current heartbeat system involves calling ``os.fchmod`` on
temporary file handlers and may block a worker for arbitrary time
if the directory is on a disk-backed filesystem.
See :ref:`blocking-os-fchmod` for more detailed information
and a solution for avoiding this problem.
"""


Expand Down

0 comments on commit 8fe132b

Please sign in to comment.