Closed vitale0 closed 6 years ago
not sure, I have to look into this... thnx for reporting
can you provide a little script demonstrating this issue?
this:
list($beans) = R::dispenseAll('bean*2000');
R::storeAll($beans);
for($i=0; $i<1000; $i++) {
$rows = R::getAll('select * from bean limit 500');
echo (count($rows) . ' -- ' . memory_get_usage());
echo "\n";
}
does not cause a leak... over here
Updating from php 5.4.7 (xampp on windows) to the latest php 7 version included in xampp made the issue go away. On the redbeanphp website it says that php version 5.3 is required..
I have a script with a loop which retrieves ~20k rows from mysql using redbean in every iteration. Every time it retrieves data the php.exe memory usage increases until it reaches the maximum allowed and exits. I'd expect that every time I retrieve data with redbean the data retrieved in the previous iteration would be discarded however apparently it's still kept in memory. I have set useWriterCache to FALSE. I have used find, findAndExport as well as getAll functions with the same results. I have tried Redbeanphp version 3.5, 4.3 and 5 with the same results.
What could be causing this behavior? Is there a way around this?