-
Notifications
You must be signed in to change notification settings - Fork 373
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
Specifying 'QueryTimeout'
issues a LOCK_TIMEOUT
on the server
#1027
Comments
It also looks like every statement will produce a command to |
Hi @gjdanis, where did you see that |
Hey @yitam I opened up SQL Server Profiler - you should see it executed before each query. |
hi @gjdanis Using your repro script, I could see that the query took roughly 40s to return. It seems that query timeout has no effect on PDO::exec(). That being said, if using a prepared statement, then query timeout works. For example,
The output I got was
Will investigate some more and get back to you on this. |
Hey @yitam any update on this? I can confirm that statement options seem to work. Here's the trace I ran and it looks like we issue this setting prior to running the query. |
Thanks @gjdanis for your patience. We have confirmed it's a bug in our implementation for PDO::exec(). |
hi @gjdanis if you have time please test again with our new release 5.7.1-preview. |
Closing this issue as this should have been fixed in the latest release 5.8.0. Please feel free to reopen if you have any questions concerning this. |
@yitam thank you for your work on this - I can confirm the issue is fixed. |
In the pdo_sqlsrv and sqlsrv drivers it looks like setting
'QueryTimeout'
actually issues aLOCK_TIMEOUT
command on the server. Here's an example with PDO:This likely isn't what we want as read queries that don't take any locks and exceed this timeout won't be killed.
Is there a recommended approach to ensure that read queries don't exceed a user specified query timeout?
The text was updated successfully, but these errors were encountered: