You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a known gap, opening up issue in case someone faces this - registering as a bug.
The connection timeout parameter is not forwarded to the mssql-py-core TDS connection that cursor.bulkcopy() opens internally. mssql-py-core/src/connection.rs defaults to 15 seconds, and there is currently no way for users to override this value from Python.
Current behavior
connect(timeout=X) sets the ODBC query timeout. This applies to execute, fetch, etc. but has no effect on the separate connection that cursor.bulkcopy() opens through pycore.
connstr_to_pycore_params() in helpers.py drops connect_timeout from the key map, so it never reaches pycore.
The pycore side defaults to 15 seconds when connect_timeout is not provided. Users have no way to override this.
Expected behavior
The connection timeout should be forwarded from the Python side through connstr_to_pycore_params() to mssql_py_core.PyCoreConnection, allowing users to control how long the Rust TDS connection waits when establishing a connection to SQL Server.
Possibly related
This may be related to #595 (random "Timeout while connecting" errors during concurrent bulk loads on 1.7.1). The hardcoded 15-second timeout may be insufficient under heavy concurrent load, and users currently cannot increase it.
Activity
github-actions commentedon Jun 4, 2026
Hi Gaurav Sharma (@bewithgaurav), thank you for opening this issue!
Our team will review it shortly. We aim to triage all new issues within 24-48 hours and get back to you.
If you have additional information to share, please feel free to update the issue.
Thank you for your patience!
CHORE: set _timeout on bulkcopy mock cursor in test_008
FIX: forward connection timeout to bulkcopy pycore connection (#650)
bewithgaurav commentedon Jul 13, 2026
PR merged, will close this one off once goes live in next release
RELEASE:1.12.0 (#689)