Mysql – max_used_connections in thesql keeps on increasing on ubuntu 11.10

apache-2.2MySQLmysql5

We are having mysql 5.1.58 running on ubuntu 11.10 server edition with 48 gb ram and intel e5620 processor together with apache 2.2.20.
But we are facing an issue that prevents Mysql from accepting any more connections, even though i have set

  • max_connections as 800

  • key_buffer to 4Gb(Myisam as default engine with 3 tbales of Innodb).

  • key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections=5.4Gb

and after each mysql restart max_used_connection becomes close to 600 with in a couple of hours even with out any users.We have enabled query cache and thread cache.Can you please help in finding the real proble.Can it be because of any configuration error or due to any Coding error???
We also tried using Default mysql configuration but nothing changed,But changing Apache's Configuration to default is showing huge difference,now max_used is stable at 57 instead of 595 with edited configuration.Can anyone tell me what's causing apache to take mysql to reach its max_used_connection value.In Apache max_clients is 800 with max_spare_servers 200

Best Answer

I would look at your application(s). It sounds like a webapp that is not releasing connections, or a connection pool issue.

Related Topic