Skip to content

Commit

Permalink
Increase SQLite timeout. Ref #2422
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Oct 31, 2024
1 parent 0122070 commit 2718224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gns3server/db/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2718224

Please sign in to comment.