From d59c8670106f10d8951c7fce5db0ee3f0015dbe0 Mon Sep 17 00:00:00 2001 From: erjemin Date: Fri, 20 Mar 2026 03:05:38 +0300 Subject: [PATCH] fix: increase SQLite timeout to 60s and enable WAL mode for better concurrency with multiple Gunicorn workers --- dicquo/dicquo/settings.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dicquo/dicquo/settings.py b/dicquo/dicquo/settings.py index b0dfe54..65b33b6 100644 --- a/dicquo/dicquo/settings.py +++ b/dicquo/dicquo/settings.py @@ -81,8 +81,10 @@ DATABASES = { 'NAME': BASE_DIR.parent / 'database/db.sqlite3', 'OPTIONS': { # Таймаут ожидания блокировки SQLite (в секундах) - # При сложных операциях (например, каскадное удаление тегов) нужно больше времени - 'timeout': 20, + # ВАЖНО: Увеличен до 60 сек для работы с несколькими воркерами Gunicorn + 'timeout': 60, + # Дополнительные опции для лучшей работы SQLite при concurrent доступе + 'init_command': "PRAGMA journal_mode=WAL;", # Write-Ahead Logging для лучшей concurrency }, } }