Page 4 of 4

Re: table nagios_notifications crashed (in every hour)

Posted: Thu Dec 05, 2019 9:36 pm
by eycklin
Hi,

Below is from log:

191205 9:13:26 [Note] Found 126631 of 0 rows when repairing './nagios/nagios_notifications'



191206 9:11:32 [ERROR] mysqld: Table './nagios/nagios_notifications' is marked as crashed and last (automatic?) repair failed
191206 9:11:32 [ERROR] mysqld: Table './nagios/nagios_notifications' is marked as crashed and last (automatic?) repair failed
191206 9:11:35 [ERROR] mysqld: Table './nagios/nagios_notifications' is marked as crashed and last (automatic?) repair failed
191206 9:11:35 [ERROR] mysqld: Table './nagios/nagios_notifications' is marked as crashed and last (automatic?) repair failed

So, it obviously as expected, dbmaint cron job which runs once a day, cause db crashed, right?

Any suggestions/workaround to solve this issue?

Thanks,
Eyck Lin

Re: table nagios_notifications crashed (in every hour)

Posted: Fri Dec 06, 2019 10:00 am
by tgriep
Yes, it was expected to only crash once a day when the Optimize ran.

Add these lines in the /etc/my.cnf file under the [mysqld] section.

Code: Select all

innodb_log_buffer_size = 32M
innodb_buffer_pool_size = 1G
innodb_log_file_size = 256M
Save the change.

Run the following to restart the processes.

Code: Select all

systemctl stop nagios
systemctl stop ndo2db
systemctl stop crond
pkill -9 -u nagios
systemctl restart mariadb
systemctl start ndo2db
systemctl start nagios
systemctl start crond
Then run the following to convert the table to the INNODB engine

Code: Select all

echo 'ALTER TABLE nagios.nagios_notifications engine=INNODB;' | mysql -u root -pnagiosxi
An INNODB table is processed differently than an MYISAM table when optimized and we will see if that fixes the issue.

Re: table nagios_notifications crashed (in every hour)

Posted: Mon Dec 09, 2019 5:03 am
by eycklin
Hi,

We've done the modification.

and change database optimization interval back to 60 minutes.

From 10:00am till 18:00, it's ok, no DB crashed.

We'll still monitor this DB status for some days.

ps: Do you need any log file?

Many Thanks.
Eyck Lin

Re: table nagios_notifications crashed (in every hour)

Posted: Mon Dec 09, 2019 10:08 am
by tgriep
That's good news that the crash hasn't happened so far.
For now, I do not need any log files unless the issue comes back.