Repair dashboard database and disable WAL mode
This commit is contained in:
@@ -56,8 +56,11 @@ DB_WRITE_LOCK = threading.Lock()
|
||||
|
||||
|
||||
def configure_sqlite_connection(conn):
|
||||
conn.execute('PRAGMA journal_mode=WAL')
|
||||
conn.execute('PRAGMA synchronous=NORMAL')
|
||||
# Docker에서 8091/8092가 같은 SQLite 파일을 bind mount로 공유한다.
|
||||
# WAL/SHM 파일이 남은 상태에서 컨테이너 재시작/복구가 섞이면 malformed가 반복될 수 있어
|
||||
# 운영 모드는 단일 DB 파일 중심의 DELETE journal로 둔다.
|
||||
conn.execute('PRAGMA journal_mode=DELETE')
|
||||
conn.execute('PRAGMA synchronous=FULL')
|
||||
conn.execute('PRAGMA busy_timeout=30000')
|
||||
return conn
|
||||
|
||||
|
||||
Reference in New Issue
Block a user