Hi
I am on zend version 1.11.11 and executing a cron job in php whic is facing a memory leak issue with fetchall() method in Zend_Db_Adapter_Abstract.
I am using Zend_Db_Adapter_Mysqli to fetch data from db. On executing fetchall() I see an increase in memory which is not reclaimed. The method sample is :
public function getData($id) {
$sql = 'select ------ where Id = ?';
// create the bind array
$data = array( $id);
$conn = new Zend_Db_Adapter_Mysqli();
$results = $conn->fetchAll($sql, $data, Zend_Db::FETCH_ASSOC);
$data=somefunction($results);
return $data;
}
On looking further into fetchall() , I found that the execute method was increasing the memory. It seems obvious since data will be fetched from db but the increase in memory is not reclaimed.I am making the fetch call with same sql in a loop and after every fetch the memory does not increase , it increases randomly in some fetch calls and keeps pilling up.
Questions:
Why is the memory not getting reclaimed after fetch call ?
Is there a way to free up this memory by fetchcall ?
Why is the memory not increasing after every fetch call ?
Thanks

