#47477 [Opn->Csd]: [PATCH] php_curl_stream_read() unnecessarily sleeps 15 secs under heavy load

From: Date: Mon, 23 Feb 2009 15:58:53 +0000
Subject: #47477 [Opn->Csd]: [PATCH] php_curl_stream_read() unnecessarily sleeps 15 secs under heavy load
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-134129@lists.php.net to get a copy of this message
ID: 47477 Updated by: iliaa@php.net Reported By: g dot bonacci at libero dot it -Status: Open +Status: Closed Bug Type: cURL related Operating System: * PHP Version: 5.*CVS, 6CVS (2009-02-23) New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2009-02-23 09:40:15] g dot bonacci at libero dot it Description: ------------ php_curl_stream_read() in ext/curl/streams.c always calls select() after firing up a connection. however, when the php client is under heavy load, the server might have already responded, and the last call to curl_multi_perform() before entering the loop might have received all the data and closed the connection. at this point, curl_multi_fdset() in the loop returns maxfs == -1, and the following select turns into a pointless 15 sec sleep. please see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514832 for reference. a patch is available at http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=php.curlstream.patch;att=1;bug=514832 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47477&edit=1

« previous php.bugs (#134129) next »