diff options
author | Alberto Sottile <alby128@gmail.com> | 2023-05-12 13:09:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 08:09:38 -0300 |
commit | e901407e2369ddb16a5c866e1f2fbf8ea8acf549 (patch) | |
tree | 37654b392eef8167261d6ab830f1f2c6301093a1 | |
parent | 72a86ceb33749d4fd17d3d2910e19b9d9ca1643b (diff) | |
download | django-e901407e2369ddb16a5c866e1f2fbf8ea8acf549.tar.gz |
Clarified database connections lifetime outside HTTP requests.
-rw-r--r-- | docs/ref/databases.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index 3768325e11..0d0409180c 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -31,7 +31,7 @@ Persistent connections ---------------------- Persistent connections avoid the overhead of reestablishing a connection to -the database in each request. They're controlled by the +the database in each HTTP request. They're controlled by the :setting:`CONN_MAX_AGE` parameter which defines the maximum lifetime of a connection. It can be set independently for each database. @@ -97,6 +97,10 @@ either restore Django's defaults at the end of each request, force an appropriate value at the beginning of each request, or disable persistent connections. +If a connection is created in a long-running process, outside of Django’s +request-response cycle, the connection will remain open until explicitly +closed, or timeout occurs. + Encoding -------- |