Skip to content

Commit 2718224

Browse files
committed
Increase SQLite timeout. Ref #2422
1 parent 0122070 commit 2718224

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gns3server/db/tasks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async def connect_to_db(app: FastAPI) -> None:
7777

7878
db_path = os.path.join(Config.instance().config_dir, "gns3_controller.db")
7979
db_url = os.environ.get("GNS3_DATABASE_URI", f"sqlite+aiosqlite:///{db_path}")
80-
engine = create_async_engine(db_url, connect_args={"check_same_thread": False}, future=True)
80+
engine = create_async_engine(db_url, connect_args={"check_same_thread": False, "timeout": 20}, future=True)
8181
alembic_cfg = config.Config()
8282
alembic_cfg.set_main_option("script_location", "gns3server:db_migrations")
8383
#alembic_cfg.set_main_option('sqlalchemy.url', db_url)

0 commit comments

Comments
 (0)