From:             g dot bonacci at libero dot it
Operating system: linux
PHP version:      5.3CVS-2009-02-23 (CVS)
PHP Bug Type:     Performance problem
Bug description:  php_curl_stream_read() unnecessarily sleeps 15 secs under 
heavy load

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 bug report at http://bugs.php.net/?id=47477&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=47477&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=47477&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=47477&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=47477&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47477&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=47477&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=47477&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=47477&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=47477&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=47477&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=47477&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=47477&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=47477&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=47477&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47477&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47477&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=47477&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=47477&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=47477&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=47477&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=47477&r=mysqlcfg

Reply via email to