Open GoogleCodeExporter opened 9 years ago
same issue also. also with active php5.3 gc it has the same behaviour.
Original comment by marius.g...@googlemail.com
on 1 Sep 2011 at 11:21
Same here. php5.3.2, gc enabled.
Original comment by gjorgjio...@gmail.com
on 22 Sep 2011 at 4:01
hmmm I'm wrong.
with unloadDocuments there is no leak. Only when unloadDocuments is missing the
leak occurs.
This doesn't prevent the leak:
for ($i = 0;$i<=5000;$i++) {
$browser = PhpQuery::newDocument($content, 'text/html');
$browser=null;
gc_collect_cycles();
}
The PHP in this case is not aware of the leak and the leak goes over the
memory_limit set in php.ini.
Original comment by gjorgjio...@gmail.com
on 22 Sep 2011 at 4:22
That's strange because in my case phpQuery::unloadDocuments() doesn't free up
RAM..
Original comment by sergi...@gmail.com
on 7 Nov 2011 at 11:03
I can confirm the memory leak. I had a few scripts where I had to call
PhpQuery::newDocument in a loop. With time, the script eat up more and more
RAM. I tried something similar to @gjorgjio:
while condition
$page = PhpQuery::newDocument($content, 'text/html');
unset($page)
gc_collect_cycles();
end
but this doesn't help. i will try unloadDocuments at some moment and let you
know about the results.
Original comment by tolean...@gmail.com
on 5 Jun 2012 at 2:55
No memory leaks by calling phpQuery::unloadDocuments() at each iteration.
Original comment by gatis.la...@gmail.com
on 27 Jun 2012 at 6:29
I had a memory leak in by calling phpquery in a loop (php process ~80% memory
usage), after calling unloadDocuments everytime in the loop, it's now only 1,5%
memory usage.
Original comment by Dietrich...@gmail.com
on 17 Jul 2012 at 1:58
I was experiencing problems with the phpQuery::newDocument() causing lots of
memory usage. I wasn't exactly calling it directly in a loop, but rather in a
function that was being called in a loop. Tried calling unset() on the object
that was holding the return of phpQuery::newDocument(), but that didn't help.
I put phpQuery::unloadDocuments() at the end of my function call, and I no
longer am seeing the "leaking" memory.
Original comment by jus...@innersync.com
on 20 Sep 2012 at 1:13
Original issue reported on code.google.com by
sergi...@gmail.com
on 1 Sep 2011 at 11:18