php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28392 Abnormally High CPU Usage
Submitted: 2004-05-14 01:41 UTC Modified: 2004-05-14 15:00 UTC
From: gabe at horizondatacom dot com Assigned:
Status: Not a bug Package: cURL related
PHP Version: 4.3.6 OS: Windows 2000
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gabe at horizondatacom dot com
New email:
PHP Version: OS:

 

 [2004-05-14 01:41 UTC] gabe at horizondatacom dot com
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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-14 15:00 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

All of the processing is done by libcurl, not PHP in this 
case. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC