From 2718224dde2f55cd31f210003d2984a948ed0309 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 31 Oct 2024 21:31:03 +1000 Subject: [PATCH] Increase SQLite timeout. Ref #2422 --- gns3server/db/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/db/tasks.py b/gns3server/db/tasks.py index 35b31ec1..95880a76 100644 --- a/gns3server/db/tasks.py +++ b/gns3server/db/tasks.py @@ -77,7 +77,7 @@ async def connect_to_db(app: FastAPI) -> None: db_path = os.path.join(Config.instance().config_dir, "gns3_controller.db") db_url = os.environ.get("GNS3_DATABASE_URI", f"sqlite+aiosqlite:///{db_path}") - engine = create_async_engine(db_url, connect_args={"check_same_thread": False}, future=True) + engine = create_async_engine(db_url, connect_args={"check_same_thread": False, "timeout": 20}, future=True) alembic_cfg = config.Config() alembic_cfg.set_main_option("script_location", "gns3server:db_migrations") #alembic_cfg.set_main_option('sqlalchemy.url', db_url)