Gossamer Forum
Home : General : Databases and SQL :

Mysql watchdog

Quote Reply
Mysql watchdog
Occassionally my mysql database crashes and when I notice, I stop it and start it and the problem is solved. I've just made some changes to the config which I hope will stop the problem occuring in the future.

However, I have a watchdog script that checks my mod_perl server and stops and restarts it if necessary - I was wondering whether anyone knows of a similar script that I could use to check the mysql database?

Thanks,
Laura.
The UK High Street
Quote Reply
Re: [afinlr] Mysql watchdog In reply to
Under Unix, there are several scripts/daemons out there that do that.

I'm at a loss to remember them, but some of them are part of extended core utilities, and all require root access to install. They are similar to the daemons that watch qmail/sendmail, various system services, etc. The last time I installed anything like that was over 5 years ago.
GT's excellent hosting has made me lazy ;) One was a script you could add services to, and it would watch them for responsiveness, and restart if necessary.

As for a user script, or cron to watch mySQL, have you checked the larger code repositories?

A more serious question is _why_ is your database doing that??? Something is unstable, and this is a big club to use, when a more surgical strike is probably warranted.

MySQL is _really_ *REALLY* stable, and shouldn't be crashing.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Mysql watchdog In reply to
Thanks Pugdog. I can't remember now exactly what the error said but the solution seemed to be to set max_connect_errors to a higher number which I have now done. So I'm hoping this particular error wont occur again. I just wondered whether there was an easy way to check in case of any future problems.
Quote Reply
Re: [afinlr] Mysql watchdog In reply to
Laura:

I had a similar problem... things would run fine for weeks, and then all of a suggen, WHAMMO. I could only see it in TOP- typoically, MySQL runs at 3-4%, but then I would see it jump to 85%, and I know it was time for a restart...

I upped Max_Connections- it's about 250 now- and have not seem to have had the problem anymore. When it was set lower, I would sometimes hit the max. Now, I seem to max out at 220 or so... so 250 is good for me.

If you run into anythung for this, please post!

Also, curious- what do you use to "watch" mod_perl? I think that sounds interesting!

Thanks!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Mysql watchdog In reply to
Thanks for that - I'll have a look at my max connections setting.

This is where I got my mod_perl watchdog:
http://perl.apache.org/..._Server___A_watchdog_

I use the second one with a very simple cgi file that prints a word. It has worked very well for me.

Laura.
Quote Reply
Re: [afinlr] Mysql watchdog In reply to
Laura:

Thanks!
dave

Big Cartoon DataBase
Big Comic Book DataBase