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
Problem description and steps to reproduce
Setting the 'query_timeout' option works as expected. The exception is raised after the expected interval ('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Query timeout expired (0) (SQLExecDirectW)'). However, when django attempts to close the connection (ex, when you close a django shell), those close operation takes 10 minutes.
To reproduce:
Set the the 'query_timeout' option in your settings, as above.
Open a django shell, and trigger an occurrence of the timeout.
Close the django shell, and notice the time required.
$ python manage.py shell
>>> from transaction.models import Transaction
>>> try:
>>> # Trigger some slow query.
>>> objects = list(Transaction.objects.all())
>>> except Exception as e:
>>> if 'Query timeout expired' in str(e):
>>> print("successfully triggered the query timeout!")
>>> raise
>>> [ctrl-D]
now exiting InteractiveConsole... # <-- This hangs for 10 minutes??
Expected behavior and actual behavior
I expect the connection closing procedure to be quick, but it takes 10 minutes.
The text was updated successfully, but these errors were encountered:
Software versions
Database Connection Settings
Problem description and steps to reproduce
Setting the 'query_timeout' option works as expected. The exception is raised after the expected interval
('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Query timeout expired (0) (SQLExecDirectW)')
. However, when django attempts to close the connection (ex, when you close a django shell), those close operation takes 10 minutes.To reproduce:
Expected behavior and actual behavior
I expect the connection closing procedure to be quick, but it takes 10 minutes.
The text was updated successfully, but these errors were encountered: