From ab4bb5b2f93d5bb4e1375594adad9d8c596fb8a7 Mon Sep 17 00:00:00 2001 From: Carlton Gibson Date: Thu, 13 Mar 2025 10:23:00 +0100 Subject: [5.1.x] Fixed #33497 -- Doc'd that persistent DB connections should be disabled in ASGI and async modes. Backport of 8713e4ae96817a0c7be3f7a8fee25a7c7f819721 from main. --- docs/ref/databases.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/ref/databases.txt') diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index fff8f928fc..b8dfcea2b7 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -40,6 +40,10 @@ database connection at the end of each request. To enable persistent connections, set :setting:`CONN_MAX_AGE` to a positive integer of seconds. For unlimited persistent connections, set it to ``None``. +When using ASGI, persistent connections should be disabled. Instead, use your +database backend's built-in connection pooling if available, or investigate a +third-party connection pooling option if required. + Connection management ~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.3