fix: increase SQLite timeout to 60s and enable WAL mode for better concurrency with multiple Gunicorn workers
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 36s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 36s
This commit is contained in:
@@ -81,8 +81,10 @@ DATABASES = {
|
|||||||
'NAME': BASE_DIR.parent / 'database/db.sqlite3',
|
'NAME': BASE_DIR.parent / 'database/db.sqlite3',
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
# Таймаут ожидания блокировки SQLite (в секундах)
|
# Таймаут ожидания блокировки SQLite (в секундах)
|
||||||
# При сложных операциях (например, каскадное удаление тегов) нужно больше времени
|
# ВАЖНО: Увеличен до 60 сек для работы с несколькими воркерами Gunicorn
|
||||||
'timeout': 20,
|
'timeout': 60,
|
||||||
|
# Дополнительные опции для лучшей работы SQLite при concurrent доступе
|
||||||
|
'init_command': "PRAGMA journal_mode=WAL;", # Write-Ahead Logging для лучшей concurrency
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user