ParallelCurl icon indicating copy to clipboard operation
ParallelCurl copied to clipboard

Another infinite loop

Open diigits opened this issue 11 years ago • 1 comments

If a page which is running parallel curl's loading is stopped by a client, that page will forever be stuck in a loop.

On line 159: // Blocks until there's less than the specified number of requests outstanding private function waitForOutstandingRequestsToDropBelow( $max ) { while ( 1 ) { $this->checkForCompletedRequests(); if ( count( $this->outstanding_requests )<$max ) break;

        usleep( 10000 );
    }
}

This will make the script stop on php-fpm and infinitely loop through the usleep( 10000 ). I thought it was an issue with my server or php-fpm but I traced it back to this and made my server simply close the function if it can't do it after up to 20 seconds.

diigits avatar May 10 '14 07:05 diigits

I have to same problem. Page is error 500

oguzdelioglu avatar Nov 09 '19 11:11 oguzdelioglu