From f756e28daf4ef733c8d47896358a3525512bb129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20I=C3=9Fbr=C3=BCcker?= Date: Fri, 6 Oct 2023 23:29:29 +0200 Subject: [PATCH] Fix memory leak with SQLite (#548) --- siteroot/settings/base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/siteroot/settings/base.py b/siteroot/settings/base.py index e54bc6dd..499f6c58 100644 --- a/siteroot/settings/base.py +++ b/siteroot/settings/base.py @@ -225,6 +225,11 @@ 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'data', 'db.sqlite3'), 'OPTIONS': LD_DB_OPTIONS, + # Creating a connection loads the ICU extension into the SQLite + # connection, and also loads an ICU collation. The latter causes a + # memory leak, so try to counter that by making connections indefinitely + # persistent. + 'CONN_MAX_AGE': None } DATABASES = {