I have been running a webserver for some years now but recently it started acting up. I identified that the issue is with mysql since queries would take longer and longer, and restarting it would solve the problem. Last night however, the whole thing blew up in my face when the server stalled so much that I could not even SSH to it.
What it is: It’s a CentOS 5 64bit machine, 8GB ram
What it is running: LAMP with a couple of low traffic websites, a minecraft server and a teamspeak server. Most websites are running WordPress.
Memory & CPU wise there was no problem visible to my untrained eyes in the moments when I perceived that MySQL requests would take oddly long time. MySQL is running with out-of-the-box config, I never changed anything.
So I started looking at the MySQL status today and discovered that there are several numbers that are red:
- Innodb_buffer_pool_reads 813
- Handler_read_rnd 19.1 k
- Handler_read_rnd_next 6.3 M
- Created_tmp_disk_tables 1.1 k
- Sort_merge_passes 1
- Opened_tables 12.5 k
- Table_locks_waited 2
Unfortunately I am completely clueless when it comes to these figures. The only one that I assume that is odd is the open tables. I could not tell you why on earth I would have 12k open tables. When I look at the list, there are only 85. The figure is at 2K right after starting the server.
Any idea what can be wrong? What can I do to debug that?
If the question is how to debug that, I guess this is a little bit of an answer:
Starting point.
Regards, good luck