Wednesday, September 21, 2005

max_timeout

Been trying to figure out why my MySQL server kept dying on me. Ive written an internal application which all employees use. After about an hour of running, the server just stops accepting any more connections and dies.

Totally unacceptable!

So I tried changing this:
# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.

max_connections=1000

Unfortunately as I tried adding more and more connections, and the server refused anything more than 105 connections, for some strange reason.

I noticed that the webapp left some 'sleeping' processes which will eventually timeout, freeing up the connection. So instead of the infinite time of 1000000 seconds, Ive put it to a more reasonable 3600s (1 hour) and now things are behaving abit better.

wait_timeout=3600

I hate tweaking database servers.

yk.

0 lewsers: