|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-03-18 16:30 UTC] kalle@php.net
[2010-03-18 16:30 UTC] kalle@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: kalle
[2010-03-18 16:30 UTC] kalle@php.net
[2020-02-07 06:09 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 07:00:01 2025 UTC |
Description: ------------ At the curl_multi_init there is an example that says: $running=null; //execute the handles do { curl_multi_exec($mh,$running); } while ($running > 0); This causes a *very* tight loop while curl requests the files, as a result an almost 100% cpu usage. My suggestion is to put a usleep() with a 10ms delay inside the loop: $running=null; //execute the handles do { usleep(10000); curl_multi_exec($mh,$running); } while ($running > 0);