From e611530bd02ea4616e8ded61f5116c77cbbbee7c Mon Sep 17 00:00:00 2001 From: aitbc Date: Wed, 22 Apr 2026 14:39:32 +0200 Subject: [PATCH] Disable SQLite WAL mode due to disk I/O errors - Comment out PRAGMA journal_mode=WAL in database.py - Keep other SQLite optimizations (synchronous=NORMAL, cache_size, temp_store) - CoW already disabled on data directory via chattr +C --- apps/blockchain-node/src/aitbc_chain/database.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/blockchain-node/src/aitbc_chain/database.py b/apps/blockchain-node/src/aitbc_chain/database.py index dc93524a..c3226adf 100755 --- a/apps/blockchain-node/src/aitbc_chain/database.py +++ b/apps/blockchain-node/src/aitbc_chain/database.py @@ -24,7 +24,8 @@ _engine = create_engine(f"sqlite:///{settings.db_path}", echo=False) @event.listens_for(_engine, "connect") def set_sqlite_pragma(dbapi_connection, connection_record): cursor = dbapi_connection.cursor() - cursor.execute("PRAGMA journal_mode=WAL") + # WAL mode disabled due to disk I/O errors (CoW already disabled on data directory) + # cursor.execute("PRAGMA journal_mode=WAL") cursor.execute("PRAGMA synchronous=NORMAL") cursor.execute("PRAGMA cache_size=-64000") cursor.execute("PRAGMA temp_store=MEMORY")