#20426 [Com]: php.exe refused to end process: can not close connection to MSSQL
| From: | ulysses at mail dot fitan dot com dot tw | Date: | Fri, 15 Nov 2002 03:29:32 +0000 |
| Subject: | #20426 [Com]: php.exe refused to end process: can not close connection to MSSQL | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-24933@lists.php.net to get a copy of this message | ||
ID: 20426
Comment by: ulysses@mail.fitan.com.tw
Reported By: ulysses@mail.fitan.com.tw
Status: Open
Bug Type: IIS related
Operating System: Windows 2000 Server
PHP Version: 4.2.3
New Comment:
The problem came back again. Service Pack did not fixed the
problem. I'll try to reduce all unrelated code, and find
out where the problem is.
Previous Comments:
------------------------------------------------------------------------
[2002-11-14 06:46:50] ulysses@mail.fitan.com.tw
I'm not sure which category should this note be classified.
IIS related or MS-SQL related.
I'm using Windows 2000 Professional and MS-SQL 2000
Developer. Recently I switched to Windows 2000 Server. It
should be 100% compatiable, but my applications now have
DEADLOCK-like problems.
I have one code that handles data display from SQL (when
using GET) and data update (when using POST). When user
POST something, this code will executing UPDATE SQL
commmand and output <meta http-equiv="refresh"> HTML to
redirect to it self (using GET,) so that the user would see
the change.
That code works properly on Windows 2000 Professional. But
now PHP would crash sometimes (NOT ALWAYS!) when the
browser re-enter the page after executing UPDATE.
I've traced my application using lots of echo() and flush
(), it DID successfully execute to the last command, but
browser refused to close TCP/IP connection. I checked the
server status with task manager, the php.exe hangs there
for 10 minutes, and I can not stop that process by using
task manager, IIS reboot or stop SQL Service. The Only
effective way to stop the process is to power-off server.
This crash condition only happens when I read one row from
SQL server that is just updated (and committed). For
example, If I have three rows that have SN=1,2,3 as primary
key, and I updated row SN=2, then PHP will crash when
reading the row SN=2 immediately, but it would be OK to
read rows that SN=1 or 3 at the same time. This should not
be the cache problem, cause I changed client to read the
page, and I changed the filename of that PHP code.
It appear to me that SQL server did not release row-level
lock after commit transactions and close connection. When
other processes try to read this row, SQL Server whould not
close the connection properly, and php.exe could not end
the process.
This problem seemed to be fixed after installing SQL Server
Service Pack 1. But I'm not sure whether will it happen
again. I hope that it's just a bug in my code. But I can
not explain why SOME record would work while others won't.
My PHP4.23 is Windows binary installer version, and the
php_mssql.dll is extracted from PHP4.23 Windows binary ZIP
version. I did not install other modules.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20426&edit=1