Commit 01bf430 1 parent e80ac37 commit 01bf430 Copy full SHA for 01bf430
File tree 2 files changed +26
-0
lines changed
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ ======================
2
+ WSGIDestroyInterpreter
3
+ ======================
4
+
5
+ :Description: Enable/disable cleanup of Python interpreter.
6
+ :Syntax: ``WSGIDestroyInterpreter On|Off ``
7
+ :Default: ``WSGIDestroyInterpreter On ``
8
+ :Context: server config
9
+
10
+ The ``WSGIDestroyInterpreter `` directive is used to control whether the Python
11
+ interpreter is destroyed when processes are shutdown or restarted. By default
12
+ the Python interpreter is destroyed when the process is shutdown or restarted.
13
+
14
+ This directive was added due to changes in Python 3.9 where the Python cleanup
15
+ behaviour was changed such that it would wait on daemon threads to complete.
16
+ This could cause cleanup of the Python interpreter to hang in the some cases
17
+ where threads were created external to Python, as is the case where Python is
18
+ embedded in a C program such as mod_wsgi with Apache.
19
+
20
+ This problem of hanging when cleanup of the Python interpreter was attempted
21
+ was especially noticeable when using mod_wsgi to host Trac.
22
+
23
+ Note that it is not known whether versions of Python newer than 3.9 still have
24
+ this problem or whether further changes were made in Python interpreter cleanup
25
+ code.
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ Configuration
14
14
configuration-directives/WSGICaseSensitivity
15
15
configuration-directives/WSGIChunkedRequest
16
16
configuration-directives/WSGIDaemonProcess
17
+ configuration-directives/WSGIDestroyInterpreter
17
18
configuration-directives/WSGIImportScript
18
19
configuration-directives/WSGILazyInitialization
19
20
configuration-directives/WSGIPassAuthorization
You can’t perform that action at this time.
0 commit comments