|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75171 Killing long running query breaks PHP connection to MSSQL database
Submitted: 2017-09-08 00:51 UTC Modified: 2017-10-24 08:19 UTC
Avg. Score:4.8 ± 0.4
Reproduced:8 of 8 (100.0%)
Same Version:2 (25.0%)
Same OS:7 (87.5%)
From: ron at healthendeavors dot com Assigned:
Status: Open Package: ODBC related
PHP Version: 7.0.23 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
26 - 22 = ?
Subscribe to this entry?

 [2017-09-08 00:51 UTC] ron at healthendeavors dot com
1. Have you PHP application up and running and connected to database
2. create a long running query that can be seen in SMSS. 
3. Query can be seen doing a whois: execute sp_whoisactive
4. Do a Kill command on the long running query: kill (spid)
5. go back to your PHP application and you will get a '[Microsoft][ODBC Driver 13 for SQL Server]Communication link failure'
6. If you go to windows event viewer and look in administrative events you will see 'Session recovery feature data used in login record to open or recover a connection is structurally or semantically invalid; the connection has been closed. Please contact the vendor of the client library. [CLIENT: <local machine>]'


Expected result:
I would expect that a problematic query could be killed without interruption to the application as a whole.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-08 00:53 UTC] ron at healthendeavors dot com
point 2: the long running query needs to be run by the PHP application.
 [2017-10-24 08:19 UTC]
-Package: MSSQL related +Package: ODBC related
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Mar 24 20:03:41 2023 UTC