just upgraded cacti 0.8.5a to 0.8.6 .. but problems shows
date was gathered with cactid,
after debuging cacti.log i know that data is gathered and stored into mysql
but .. part of poll.php didn't finish09/16/2004 02:46:23 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (50,'5min_used_mem',NOW(),'41310348')
after some more debuging i discovered that problem was in line
Code: Select all
process_poller_output($rrdtool_pipe);
in mysql this sql returned about 191000 rows .. nice$results = db_fetch_assoc("select
poller_output.output,
poller_output.time,
poller_output.local_data_id,
poller_item.rrd_path,
poller_item.rrd_name,
poller_item.rrd_num
from poller_output,poller_item
where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name)");
in lib/database.php is function db_fetch_assoc, i make litte modification
Code: Select all
$cnt = 0;
if ($query) {
while ((!$query->EOF) && ($query)) {
$data{sizeof($data)} = $query->fields;
$query->MoveNext();
$cnt++;
echo "c: $cnt\n";
}
return($data);
}
i think solution will be not to get all data to one variable and then proces it with foreach() function, but first get number of rows and then proces each row one by one.c: 25498
c: 25499
c: 25500
c: 25501
c: 25502
c: 25503
c: 25504
c: 25505
c: 25506
c: 25507
c: 25508
c: 25509
c: 25510
PHP Fatal error: Allowed memory size of 18874368 bytes exhausted (tried to allocate 12 bytes) in /var/www/cacti086/lib/adodb/drivers/adodb-mysql.inc.php on line 599
Fatal error: Allowed memory size of 18874368 bytes exhausted (tried to allocate 12 bytes) in /var/www/cacti086/lib/adodb/drivers/adodb-mysql.inc.php on line 599
what amount of memory i have to allocate for 200 000 rows
any other solutions? maybe small fix in 0.8.6a ?
edit: sorry for my bad engish