[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to monitor "too many mysql connections"?

From: Martin Pala
Subject: Re: how to monitor "too many mysql connections"?
Date: Wed, 20 Dec 2006 21:56:02 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20061105 Iceape/1.0.6 (Debian-1.0.6-1)

I think that monit mysql protocol test should detect this, for example:

  check process mysql with pidfile ...
    if failed port 3306 protocol mysql the restart

The 'protocol mysql' involves more detailed mysql test - monit will login as anonymous user, perform mysql ping and logout. In the case that you are out of connections, this test will fail and monit can for example restart the process.

What configuration do you use?


Allen Shaw wrote:

I'm using monit to make sure the MySQL server stays running, and that's going fine. But recently there's been a problem on the server where MySQL will max out on its connections and stay that way until it's killed (kill -9), sometimes causing hours of downtime. Naturally I'm looking for the source of the problem, but in the mean time, I'd like monit to be able to check if MySQL is in this state.

Monit does not detect this situation by checks against MySQL using either the port or the unix socket. The only way I've found to check this is outside of monit, running a cron script every couple of minutes to actually connect to the database and then execute an actual query, and if that fails then to run `killall -9 mysqld` and restart the service. But it seems like I should be able to do this with monit.

Can anyone offer a clue?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]