Database full

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
danathane
Cacti User
Posts: 127
Joined: Thu May 03, 2007 9:03 am

Database full

Post by danathane »

Hello everybody!!!

I have got a little problem with my Data Base. I can't add anymore information in and i don't know how to extend the size of my data base.
I mean I have space on my hard drive bu mysql doesn't seem to add anymore lines in the tables. So i tryed to add the auto_icrement size think in mysql but it is not a success, so do you have any deas about how to extend the siez of my dtabase?
For the moment i have 9118 graphs to fill, so I need a very big place in my databse. Thax a lot

Bye
danathane
Cacti User
Posts: 127
Joined: Thu May 03, 2007 9:03 am

Post by danathane »

It seems that is not a problem of a full database but a problem with the number of request i am doing to add information in the database.
No one of my insert into functiones. So please if you have any ideas, tell me, i really need them.
thanks
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You may want to tune your /etc/my.cnf. Here's mine

Code: Select all

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
max_connections=200
key_buffer_size=64M
query_cache_size=32M
read_buffer_size=1M
sort_buffer_size=4M
table_cache=256
log_slow_queries
I would bet for max_connections
Reinhard
danathane
Cacti User
Posts: 127
Joined: Thu May 03, 2007 9:03 am

Post by danathane »

Oh thanks a lot Gandalf!!
I am trying your solution.
Here is my new my.cnf

Code: Select all

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
innodb_data_file_path=ibdata1:1G:autoextend
innodb_autoextend_increment=20M
key_buffer_size=64M
query_cache_size=64M
read_buffer_size=4M
sort_buffer_size=4M
table_cache=256
log_slow_queries
For the table_cache isn't it 256M instead of 256?

Thanks bye
danathane
Cacti User
Posts: 127
Joined: Thu May 03, 2007 9:03 am

Post by danathane »

I still have my problem so i put a piece of my cactilog here in hope that someone will see where is my problem.

Code: Select all

09/04/2007 03:03:01 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "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)  LIMIT 10000"
09/04/2007 03:03:02 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "insert into poller_output (local_data_id, rrd_name, time, output) values (17308, 'traffic_in', '2007-09-04 15:00:16', '1030410538')"
09/04/2007 03:03:02 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "insert into poller_output (local_data_id, rrd_name, time, output) values (17309, 'broadcast_out', '2007-09-04 15:00:16', '123857212')"
09/04/2007 03:03:02 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "insert into poller_output (local_data_id, rrd_name, time, output) values (17309, 'broadcast_in', '2007-09-04 15:00:16', '97181')"
09/04/2007 03:03:02 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "insert into poller_output (local_data_id, rrd_name, time, output) values (17310, 'multicast_in', '2007-09-04 15:00:16', '1994')"
09/04/2007 03:03:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select poller_id,end_time from poller_time where poller_id = 0"
09/04/2007 03:03:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "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)  LIMIT 10000"
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

The next version of Cacti will add additional detail here to root out the problem. A good way to debug this would be to take the SVN/Branch 0.8.6 lib/database.php and replace yours. You will then get those error codes.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
danathane
Cacti User
Posts: 127
Joined: Thu May 03, 2007 9:03 am

Post by danathane »

I am not sure to understand what you advice me to do.
I have place this line : db_execute(truncate poller_output); in the poller.php file, and it seems that it helps to make my cacti work.

Bu the second thing i have done is to poll every ten minutes instead of 5 because i have a lot of graphics.

Should I had the line db_execute(truncate poller_output); just before every db_execute(replace into settings (name,value) ...); line?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Post your poller statistics from the log file.

Thanks,

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

danathane wrote:I am not sure to understand what you advice me to do.
I have place this line : db_execute(truncate poller_output); in the poller.php file, and it seems that it helps to make my cacti work.
First, make sure to use at least 64M memory in /etc/php.ini.
Use cactid instead of cmd.php to increase polling speed 6-8 times
Reinhard
danathane
Cacti User
Posts: 127
Joined: Thu May 03, 2007 9:03 am

Post by danathane »

I have a stupid question about cactid and cmp.php.
the poller.php command is executed automatically, but what is the difference when i use cmd.php or cactid.php?

Cactid is a plugin or is it embedded in cacti?


here is the result of php poller.php :

09/05/2007 01:56:58 PM - SYSTEM STATS: Time:413.4380 Method:cmd.php Processes:20 Threads:N/A Hosts:56 HostsPerProcess:3 DataSources:36282 RRDsProcessed:10531

I think I should try the cactid think.


Thanks
User avatar
pestilence
Cacti User
Posts: 207
Joined: Fri Jul 25, 2003 10:37 am
Location: Athens/Greece
Contact:

Post by pestilence »

danathane wrote:I have a stupid question about cactid and cmp.php.
the poller.php command is executed automatically, but what is the difference when i use cmd.php or cactid.php?

Cactid is a plugin or is it embedded in cacti?


here is the result of php poller.php :

09/05/2007 01:56:58 PM - SYSTEM STATS: Time:413.4380 Method:cmd.php Processes:20 Threads:N/A Hosts:56 HostsPerProcess:3 DataSources:36282 RRDsProcessed:10531

I think I should try the cactid think.


Thanks
cactid is the polling daemon of cacti, cmd.php does the same thing as cactid but its written in php (instead of cactid which is written in C). Cactid is way faster than cmd.php so prefer cactid instead.
/* * Oops. The kernel tried to access some bad page. We'll have to * terminate things with extreme prejudice. */ die_if_kernel("Oops", regs, error_code);
danathane
Cacti User
Posts: 127
Joined: Thu May 03, 2007 9:03 am

Post by danathane »

OKo thanks!
I have installed Cactid bu i have a little problem:

Code: Select all

CACTID: Host[1296] DS[22531] WARNING: SNMP timeout detected [500 ms], ignoring host '10.93.10.2'
CACTID: Host[1296] DS[22538] WARNING: SNMP timeout detected [500 ms], ignoring host '10.93.10.2'
CACTID: Host[1296] DS[22545] WARNING: SNMP timeout detected [500 ms], ignoring host '10.93.10.2'
i have set the snmp timeout on 600 in settings-> general, but it still use the 500 value? What can I do?

Something else, i have put the cactid and the cactid.conf in the cacti folder, but i don't know how to install the patch?
Should i launch the procedure in the cacti folder?

Thanks for the help
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

danathane wrote:OKo thanks!
I have installed Cactid bu i have a little problem:

Code: Select all

CACTID: Host[1296] DS[22531] WARNING: SNMP timeout detected [500 ms], ignoring host '10.93.10.2'
CACTID: Host[1296] DS[22538] WARNING: SNMP timeout detected [500 ms], ignoring host '10.93.10.2'
CACTID: Host[1296] DS[22545] WARNING: SNMP timeout detected [500 ms], ignoring host '10.93.10.2'
i have set the snmp timeout on 600 in settings-> general, but it still use the 500 value? What can I do?
This change takes effect for NEW targets. But you may change all existing timeout settings using a single SQL statement.
Something else, i have put the cactid and the cactid.conf in the cacti folder, but i don't know how to install the patch?
Should i launch the procedure in the cacti folder?
See Settings->Poller. Select cactid from the dropdown ans SAVE. That's it
Reinhard
danathane
Cacti User
Posts: 127
Joined: Thu May 03, 2007 9:03 am

Post by danathane »

Hello again!!

So I have made all the changes you advice me to do, and i still have the same problem.

I have set the snmp_timeout to 600,800, 1500,3000 and 100 and i still have the

Code: Select all

CACTID: Host[1296] DS[22531] WARNING: SNMP timeout detected [500 ms], ignoring host '10.93.10.2' 
CACTID: Host[1296] DS[22538] WARNING: SNMP timeout detected [500 ms], ignoring host '10.93.10.2' 
CACTID: Host[1296] DS[22545] WARNING: SNMP timeout detected [500 ms], ignoring host '10.93.10.2'
I tried the cmd.php with a toemout of 100 and it works fine.
I use cacti 0.86j and cactid 0.86i.
I have seen that their is a patch for cactid but how can i use it? before compiling the cactid or after?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

danathane wrote:I have set the snmp_timeout to 600,800, 1500,3000 and 100 and i still have the
Please tell me or send screenshot of the exact location of your change. There are several snmp timeout fields within cacti
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests