Description:
When MySQL is compiled from ports collection with LinuxThreads (2.2.3_12) under
FreeBSD 5.0 RELEASE, wait_timeout parameter gets ignored. This is valid both
setting value in my.cnf or from command line (SET GLOBAL wait_timeout).
I heard that same issue is with other versions of mysql (both 4.0.x and 3.23.x
releases) as well as different versions of FreeBSD.
This bug causes persistent connections to hang for a long time.
In fact even if the show Variables did show that the wait_timeout was set to 60, the show processlist; did show us that the value taken in account was still 28 800
In fact to take in account this value wa had to comment, in my.cnf the line
[mysqlhotcopy]
interactive-timeout
Now our cpu usage is lesser than before and same for the load average.
The thread_cache_size and wait_timeout value may really help when you have a very busy MySQL server.
Also do not forget to always have a max_connections set higher than the one set in httpd (256 by default).
By default in mysql the max_connexion is set to 100. You should change it to 300 by example