From: gabe at horizondatacom dot com Operating system: Windows 2000 PHP version: 4.3.6 PHP Bug Type: cURL related Bug description: Abnormally High CPU Usage
Description: ------------ This little code snippet is used to connect to gatewaybeta.fedex.com to transfer XML documents back and forth. The problem we're having is that this segment will cause the php.exe in a windows 2000 multi-threaded enviroment to run at 99% to 100% for a short burst (rougly 4 to 5 seconds). Especially if the script runs at the same time, the server's resources are exhausted right away! :( We've definitly narrowed the execution time and CPU burst problem down to Curl but not sure how to go about fixing it. We've tried upgrading the libCurl library for PHP to the newer version 7.11.2 but there are no compiled DLL's for Windows servers. Any ideas? Our Config: stem Windows NT TESTCOT 5.0 build 2195 Build Date Apr 14 2004 17:17:11 Server API CGI/FastCGI Virtual Directory Support enabled PHP API 20020918 PHP Extension 20020429 Zend Extension 20021010 Debug Build no Thread Safety enabled Registered PHP Streams php, http, ftp, compress.zlib CURL Information libcurl/7.10.5 OpenSSL/0.9.7b zlib/1.1.4 Reproduce code: --------------- $this->ch = curl_init (); curl_setopt ($this->ch, CURLOPT_URL, "$this->postServ") curl_setopt ($this->ch, CURLOPT_RETURNTRANSFER,1); curl_setopt ($this->ch, CURLOPT_TIMEOUT, 10); curl_setopt ($this->ch, CURLOPT_CUSTOMREQUEST, $req); curl_setopt ($this->ch, CURLOPT_SSL_VERIFYPEER, 0); $result = curl_exec ($this->ch); $err_nr = curl_errno($this->ch); curl_close ($this->ch); Expected result: ---------------- The code executes properly, but CPU usage is at 99% to 100% for 4 to 5 seconds while CURL is executing. -- Edit bug report at http://bugs.php.net/?id=28392&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28392&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28392&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28392&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28392&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28392&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28392&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28392&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28392&r=support Expected behavior: http://bugs.php.net/fix.php?id=28392&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28392&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28392&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28392&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28392&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28392&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28392&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28392&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28392&r=float
