Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[SA 7.3.435 Pro] - Query Timeout Expired on SQL Server |
|
I'm trying to run a stored procedure that is known to run 2-4 minutes, depending on the load on the server. Somewhere after 60 seconds (~65-102s) the execution stops with last line of message "The command(s) completed successfully(102.34 s)." and the second line of the messages showing "Query timeout expired."
I tried modifying the Command Timeout in connection settings from 0 to 600 secs but the showing the Raw Connection String did not reflect the changes. Also, manually editing the connection string by adding "Command Timeout=600;" but it made no difference.
What's happening here?
EDIT: Also, the line and the icon for the "Query timeout expired" line is green instead of red or yellow that would indicate that there was something wrong. The last line of the message ("completed successfully") is misleading as well.
|
|
Tue Nov 03, 2015 5:31 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Please try setting command timeout to zero, which means no timeout, and then restart SQL Assistant including the system tray application. Hope that works.
Last edited by SysOp on Tue Nov 03, 2015 11:08 am; edited 1 time in total |
|
Tue Nov 03, 2015 9:33 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
It didn't help. I still get "Query timeout expired" after ~102 seconds.
|
|
Tue Nov 03, 2015 10:53 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Are you using SA SQL Editor or SSMS? If SA, are connecting using ODBC or ADO
|
|
Tue Nov 03, 2015 11:11 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
I'm connecting in SA SQL Editor through ODBC. The query is finishes without the timeout expired error in SSMS.
|
|
Tue Nov 03, 2015 5:26 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Would you please try changing connection from ODBC to ADO.NET and see if that does the trick?
|
|
Tue Nov 03, 2015 7:18 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
It finished using ADO.NET in ~114 seconds. But I'd refrain using ADO.NET for it has its own quirks, such as not returning milliseconds for datetimes.
What would be the cause of this? I don't remember having query timeouts expire earlier.
|
|
Wed Nov 04, 2015 5:24 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Thanks for testing with ADO.NET. We will look into ODBC issue and test if the command timeout entered in the settings is negated by something else. This may take a little while. I will post any updates as they become available.
|
|
Wed Nov 04, 2015 10:37 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Thank you very much. As I said earlier, modifying the values in the editbox did not change the string shown in Raw Connection String. I hope this helps.
|
|
Wed Nov 04, 2015 12:26 pm |
|
 |
|