-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] Difference / interactions between queryTimeout and cancelQueryTimeout #1542
Comments
hi @stolsvik,
|
hi @stolsvik Just checking if this answers your question? Looking at these properties in the doc looks to me they are described accurately but of course I may have a different point of view than you. Please let us know what you find to be unclear and if you could suggest a better wording? Otherwise if we don't hear back from you we will assume you are satisfied with the answer and close the issue. |
closing due to inactivity |
"this property can be used to cancel queryTimeout set on the connection." That sentence seems to imply cancelQueryTimeout is some sort of cancelation function, rather than a setting that says how long to wait for a query to be cancelled. It could definitely be worded in a less confusing way. |
Agree strongly with the above. I would suggest something like the below (my edits only, not provided or reviewed by the driver dev team or support):
Edit - it would also be great (and is not clear to me) if the docs could offer some guidance on what value would be a reasonable default to use for this setting. I.e. what extra time does it need to allow for? The time taken to serialize and transfer the data? I'm inclined to set it to something like 30(s) for an application use case where we allow a 60s |
Hi all, Thank you for the feedback! We're looking to do a doc update in the next few weeks, and plan on including greater clarification about timeouts. |
I find it very hard to understand the queryTimeout vs. cancelQueryTimeout.
The documentation here https://docs.microsoft.com/en-us/sql/connect/jdbc/setting-the-connection-properties says "this property can be used to cancel queryTimeout set on the connection."
What does that mean? Cancelling the existing set QueryTimeout? I've tried to parse this many times, but I don't get it.
Following, we read:
"Query execution hangs and does not throw exception if TCP connection to SQL Server is silently dropped."
.. and ..
"The driver waits the total amount of cancelQueryTimeout + queryTimeout seconds, to drop the connection and close the channel."
In our case, it seems like we do have a problem with such silently dropped connections. What happens if we do set queryTimeout, but do not set the cancelQueryTimeout? What is the point of these two differing settings?
Updating the doc would be nice - and telling me here if possible!
The text was updated successfully, but these errors were encountered: