php-parallel-soap
php-parallel-soap copied to clipboard
Multi requests cause high CPU load
Hello.
When running multiple soap requests with setMulti(true), CPU load is 100%. This behavior shows especially when endpoints work slowly. This happens in the lines:
do {
$mrc = curl_multi_exec($mh, $active);
} while ($mrc === CURLM_CALL_MULTI_PERFORM || $active);
Possible solution is to call usleep or to call curl_multi_select in the loop.
OS: Debian 10 PHP version: 7.2.34 CURL version: 7.64.0
Thank you, could you share a code example to reproduce this issue, and do you think the fix could be adding optional sleep between the soap calls?