Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi requests cause high CPU load #47

Open
taxp opened this issue Mar 21, 2022 · 1 comment
Open

Multi requests cause high CPU load #47

taxp opened this issue Mar 21, 2022 · 1 comment

Comments

@taxp
Copy link

taxp commented Mar 21, 2022

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

@meabed
Copy link
Owner

meabed commented Mar 23, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants