Leaks memory
Http://stackoverflow.com/questions/26690026/php-curl-loop-leaking-memory
Up vote2down vote |
Stories from the internet indicate that's broken in for curl_setopt($ch, CURLOPT_RETURNTRANSFER, true) some Php/curl versions:
#13225 Memmory leak in curl
#40831 cURL extension doesnt clear buffer for reused handle
PHP Script Memory leak issue
PHP CURL, memory leak when using Curlopt_returntransfer
You can also find stories for DOM :
DOMDocument PHP Memory Leak
Php/domdocument:unset () does not release resources
Domdocument/xpath leaking memory during long command line Process-any-to-deconstruct this class
Create A minimal test case which spots the cause of the leak. i.e. remove the unrelated package (DOM or CURL) from the code. Then reproduce it with the latest PHP version. If It's still causing the leak, file a bug report else, the PHP version. |
Use Curl in PHP's ES third-party extension library for request requests Yes, the author discarded the original OPT output and enabled OB output
CURL opt returntransfer leaks memory, therefore OB instead.
Ob_start ();
curl_exec ($conn) ;
Ob_get_clean ();
Curl Memory Overflow leaks