About mysqld monitoring & restarting if not running, etc

Hi!

A few times the mysqld service crashes… not too often in fact, but I need to be there to restart it and sometimes Im off the computer and the services do not work until I get home…

Do you have any advices about this "issue"?

Any way to monitor and restart services if they get down, and not consuming too much resources?

Best regards!

luciano

2 Replies

Check the MySQL error log to see if you can find out why it is crashing. Most likely it is something like the process using up too much RAM and getting killed by the OS. Do you see lots of swapping going on with your Linode in the manager?

If this is the issue, then you should look at tuning settings in your my.cnf file.

Monit is a nice lightweight monitoring daemon which will do what you're asking. Chances are good you can simply install it from your distro's repositories. Keep in mind it should not be a substitute for figuring out and fixing whatever is causing MySQL to crash.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct