From ce2a9e90e060077a4d29f8efc07146c5e68db78a Mon Sep 17 00:00:00 2001 From: Floke Date: Fri, 6 Mar 2026 16:19:07 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20[30388f42]=20Deaktiviere=20WAL-Modus=20i?= =?UTF-8?q?m=20Company=20Explorer=20(Synology=20Kompatibilit=C3=A4t)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Entfernt PRAGMA journal_mode=WAL, da dies auf dem Synology-Docker-Volume zu persistierenden Transaktions-Rollbacks führt. - Behält PRAGMA mmap_size=0 und Timeout-Erhöhung bei, um Locking-Probleme im Standard-Journal-Modus zu minimieren. - Ziel: Erfolgreiche Datenbank-Commits wiederherstellen. --- company-explorer/backend/database.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/company-explorer/backend/database.py b/company-explorer/backend/database.py index 0fb57c5a..4dd88791 100644 --- a/company-explorer/backend/database.py +++ b/company-explorer/backend/database.py @@ -10,13 +10,11 @@ engine = create_engine( connect_args={"check_same_thread": False, "timeout": 30} ) -# Enable WAL mode for SQLite with Docker/Synology optimizations +# Disable mmap to avoid Docker volume issues on Synology @event.listens_for(engine, "connect") def set_sqlite_pragma(dbapi_connection, connection_record): cursor = dbapi_connection.cursor() - cursor.execute("PRAGMA journal_mode=WAL") - cursor.execute("PRAGMA synchronous=NORMAL") # Less aggressive syncing, better for concurrent access - cursor.execute("PRAGMA mmap_size=0") # Disable mmap to fix potential Docker volume I/O errors + cursor.execute("PRAGMA mmap_size=0") cursor.close() SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)