|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-07-09 19:39 UTC] simon at connexon dot com
Description: ------------ We've been using soap for a while now and noticed that when we send a soap request and it waits for a response, PHP goes in a sort of loop and takes CPU load. Our average waiting time is 4 seconds. A soap call once in a while is ok, because it doesn't take too much CPU overall. But we noticed that the more we grow, the more CPU it takes, to a point where we reach often 100% CPU if we do a loop of soap calls. (All that caused by the waiting time of the soap call!!!). Reproduce code: --------------- x Expected result: ---------------- Would it be possible that PHP goes into an idle mode when it waits for a soap response instead of taking all the CPU ressources? Actual result: -------------- CPU goes crazy when we do too many soap calls in a row (we can do maximum of 4 soap calls at once, else it would overload the server). PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 16:00:02 2025 UTC |
<? $client = new SoapClient($wsdl_location, $params); $date_time = date("Y-m-d H:i:s"); $ws_params = array("valAddressMsg" => "aaa"); $this->result = $this->handle->__soapCall("ValA", $ws_params); if ($debug) $this->displayMessageInfo(); $this->handleFault($this->result); ?> When the code gets to "$this->handle->__soapCall..." we recognize the fact that when PHP is waiting for a soap response the CPU is blocked. However this is not a good behavior as of we need the CPU to do other things also.