Welcome Guest, Not a member yet? Register   Sign In
Memory Leak HELP! [SOLVED]
#1

[eluser]Frychiko[/eluser]
Hi,

I have a callback function used in a function which parses large xml/csv feeds (up to around 200MB feeds), so it gets called tens of thousands of times during an import of a feed.

Basically when the callback function is blank, memory usage does not increase:

Code:
function import_record_handler($record)
{
return;
}

BUT...

when I make a single call using the active record db class, memory usage starts climbing.


Code:
function import_record_handler($record)
{
$exists = $this->CI->Merchant_model->get_temp_category_where(array(
        "name"             => $raw_category,
        "merchant_id"        => $this->merchant_id
    ));
return;
}

Merchant_model.php below:

Code:
function get_temp_category_where($data)
{
$this->db->where($data);    
$query = $this->db->get($this->table_temp_category);
return $query->row();
}

Memory keeps going rising until the memory limit is exhausted. Why is the memory not freed?

cheers,
Frychiko


Messages In This Thread
Memory Leak HELP! [SOLVED] - by El Forum - 08-22-2008, 10:11 AM
Memory Leak HELP! [SOLVED] - by El Forum - 08-22-2008, 10:30 AM
Memory Leak HELP! [SOLVED] - by El Forum - 08-22-2008, 10:35 AM
Memory Leak HELP! [SOLVED] - by El Forum - 08-22-2008, 11:26 AM
Memory Leak HELP! [SOLVED] - by El Forum - 07-10-2009, 12:07 PM
Memory Leak HELP! [SOLVED] - by El Forum - 07-10-2009, 06:46 PM
Memory Leak HELP! [SOLVED] - by El Forum - 07-10-2009, 07:23 PM
Memory Leak HELP! [SOLVED] - by El Forum - 07-13-2009, 02:43 AM
Memory Leak HELP! [SOLVED] - by El Forum - 07-13-2009, 08:08 AM
Memory Leak HELP! [SOLVED] - by El Forum - 10-15-2012, 11:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB