mysql crashed tables

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gregwhite
Posts: 206
Joined: Wed Jun 01, 2011 12:40 pm

mysql crashed tables

Post by gregwhite »

Every couple of months we are seeing an error that a table has crashed on mysql. We run the repair procedure and everything is fine. Is it possible to know what caused it? Should we be concerned? We have the database offloaded to another server to maximize performance. We are a healthcare facility and depend on Nagios to be up and running.
Thanks for any insight.

Greg
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: mysql crashed tables

Post by Box293 »

Normally we notice crashed tables when the server becomes overloaded however in your case the database is offloaded so I suspect in this case the SQL server is running fine. However you should check the logs on this server to see if everything is OK.

Does your Nagios XI server have sufficient resources? Disk / Memory / CPU ?

How many hosts / services do you have? To find this out go to Admin > System Config > System Profile and click the View System Info button.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
gregwhite
Posts: 206
Joined: Wed Jun 01, 2011 12:40 pm

Re: mysql crashed tables

Post by gregwhite »

Thanks for your response. Below is the information on hosts and services.
nagios (pid 2326) is running...
npcd (pid 3660) is running...
ndo2db (pid 3733) is running...
CPU Load 15: 6.11
Total Hosts: 2446
Total Services: 14933
Function 'get_base_uri' returns: http://sherlock/nagiosxi/
Function 'get_base_url' returns: http://sherlock/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://sherlock/nagiosxi/includes/compo ... rofile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/

Server statistics

Server Statistics
Metric
Value
Load
1-min 5.28
5-min 5.39
15-min 5.71

CPU Stats
User 25.75%
Nice 0.00%
System 10.91%
I/O Wait 7.51%
Steal 0.00%
Idle 55.84%
Memory
Total 23996 MB
Used 19,169 MB
Free 4,827 MB
Shared 42 MB
Buffers 294 MB
Cached 16,589 MB
Swap
Total 12,063 MB
Used 59 MB
Free 12,004 MB
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: mysql crashed tables

Post by lmiltchev »

Every couple of months we are seeing an error that a table has crashed on mysql. We run the repair procedure and everything is fine. Is it possible to know what caused it?
Database corruption is usually caused by power outages, running out of disk space or improper shutting down the Nagios XI server. Nagios is constantly reading from and writing to the mysql database, so killing the mysqld process (i.e. with "kill -9" or "killall mysqld") will lead to crashed tables.
Should we be concerned? We have the database offloaded to another server to maximize performance.
Usually running the repair script fixes the issue. You may have to implement some other boosting performance steps, e.g. ramdisk (in order to reduce I/O wait). You can view a full list of things you can do to improve performance here:

https://assets.nagios.com/downloads/nag ... p#boosting

Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked