-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs for WSGIDestroyInterpreter directive.
- Loading branch information
1 parent
e80ac37
commit 01bf430
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
====================== | ||
WSGIDestroyInterpreter | ||
====================== | ||
|
||
:Description: Enable/disable cleanup of Python interpreter. | ||
:Syntax: ``WSGIDestroyInterpreter On|Off`` | ||
:Default: ``WSGIDestroyInterpreter On`` | ||
:Context: server config | ||
|
||
The ``WSGIDestroyInterpreter`` directive is used to control whether the Python | ||
interpreter is destroyed when processes are shutdown or restarted. By default | ||
the Python interpreter is destroyed when the process is shutdown or restarted. | ||
|
||
This directive was added due to changes in Python 3.9 where the Python cleanup | ||
behaviour was changed such that it would wait on daemon threads to complete. | ||
This could cause cleanup of the Python interpreter to hang in the some cases | ||
where threads were created external to Python, as is the case where Python is | ||
embedded in a C program such as mod_wsgi with Apache. | ||
|
||
This problem of hanging when cleanup of the Python interpreter was attempted | ||
was especially noticeable when using mod_wsgi to host Trac. | ||
|
||
Note that it is not known whether versions of Python newer than 3.9 still have | ||
this problem or whether further changes were made in Python interpreter cleanup | ||
code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters