How to set connection timeout in SQLAlchemy

后端 未结 7 794
暗喜
暗喜 2020-12-14 16:00

I\'m trying to figure out how to set the connection timeout in create_engine(), so far I\'ve tried:

create_engine(url, timeout=10)
7条回答
  •  春和景丽
    2020-12-14 16:30

    For SQLite 3.28.0:

    create_engine(db_name, connect_args={'timeout': 1000})
    

    will set the connection timeout to 1000 seconds.

提交回复
热议问题