mod: вакуум и время жизни коннекта с БД

This commit is contained in:
2026-06-03 22:09:07 +03:00
parent fd70a44c81
commit 48e38fb9cf

View File

@@ -101,8 +101,10 @@ DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR.parent.joinpath('database', env('DJANGO_SQLITE_NAME', default='lpon-db.sqlite3')),
'CONN_MAX_AGE': 600, # время жизни соединения с базой
'OPTIONS': {
'timeout': 25,
'init_command': "PRAGMA journal_mode=WAL; PRAGMA auto_vacuum=2;",
},
}
}