我試圖找出如何設置連接超時在create_engine()
連接超時,到目前爲止,我已經試過:如何設置SQLAlchemy的
create_engine(url, timeout=10)
TypeError: Invalid argument(s) 'timeout' sent to create_engine(), using configuration PGDialect_psycopg2/QueuePool/Engine. Please check that the keyword arguments are appropriate for this combination of components.
create_engine(url, connection_timeout=10)
TypeError: Invalid argument(s) 'connection_timeout' sent to create_engine(), using configuration PGDialect_psycopg2/QueuePool/Engine. Please check that the keyword arguments are appropriate for this combination of components.
create_engine(db_url, connect_args={'timeout': 10})
(psycopg2.OperationalError) invalid connection option "timeout"
create_engine(db_url, connect_args={'connection_timeout': 10})
(psycopg2.OperationalError) invalid connection option "connection_timeout"
create_engine(url, pool_timeout=10)
我該怎麼辦?
什麼是對connect_timeout變量的默認值(一般和特定於MySQL數據庫? – nivhanin