|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-05-01 03:31 UTC] faerion at eggdrop dot org dot ru
Description:
------------
I use nginx+php-fastcgi under linux. My script outputs some part of file and waits for ipc message to continue sending file. max_execution_time is set to 0, ignore_user_abort is off. When user aborts the connection - nginx closes client connection and connection to php-fastcgi server. But the socket on php doesn't close and remains beeing in CLOSE_WAIT state without any timeout. There is also no script execution break caused by connection abort - connection_status() always returns 0. Example of netstat output:
tcp 1 0 127.0.0.1:10000 127.0.0.1:42347 CLOSE_WAIT 29566/php
Reproduce code:
---------------
while (!$t) {
if (msg_receive($GLOBALS['stream_queue'], 1, $msg_type, 1024, $msg, true, MSG_IPC_NOWAIT)) {
$t = true;
} else {
usleep(10000);
}
}
Expected result:
----------------
That code execution should break on user abort.
Actual result:
--------------
Actually it doesn't break.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 05:00:01 2025 UTC |
PHP 5.2.0-dev (cgi-fcgi) (built: May 1 2006 14:00:29) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies with eAccelerator v0.9.5-beta2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator The same results with latest CVS snapshot: tcp 1 0 127.0.0.1:10000 127.0.0.1:54728 CLOSE_WAIT 29561/phpPHP 5.1.5-dev (cgi-fcgi) (built: May 4 2006 14:15:11) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies with eAccelerator v0.9.5-beta2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator Nothing changes.