mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
plinth: Increase sqlite busy timeout from default 5s to 30s
Reduces the probability that plinth gives an error 500 because the database is locked. Test performed: 1) Lock the database: > sqlite3 data/var/lib/plinth/plinth.sqlite3 sqlite> PRAGMA locking_mode = EXCLUSIVE; sqlite> BEGIN EXCLUSIVE; 2) Visit plinth/apps/ 3) Only after 30s plinth logs an exception: django.db.utils.OperationalError: database is locked Closes #1786 Related to #1443 Signed-off-by: Veiko Aasa <veiko17@disroot.org> [sunil: Move the timeout value to settings module as it is static] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
ef4bd69c2a
commit
04b9538deb
@ -67,6 +67,9 @@ CAPTCHA_FLITE_PATH = '/usr/bin/flite'
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'OPTIONS': {
|
||||
'timeout': 30
|
||||
},
|
||||
# Overridden based on the configuration key store_file
|
||||
'NAME': '/var/lib/plinth/plinth.sqlite3'
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user