I've had issues with database connections problems for the past month or so. My sites go down at least twice a day. They all come pack up within a minute or so.
Then I get the i/o rate warning from linode. They are very low traffic sites so I'm not terribly concerned but I do have some clients on the box who are being affected.
I've set up the mysql-slow. log and have run this command:
mysqldumpslow -s t /var/log/mysql/mysql-slow.log
Code:
Count: 57 Time=7.33s (417s) Lock=0.00s (0s) Rows=0.0 (0), 2users@localhost
SET NAMES utf8
Count: 10 Time=26.00s (259s) Lock=18.09s (180s) Rows=90.4 (904), 3users@localhost
SELECT option_name, option_value FROM wp_options WHERE autoload = 'S'
Count: 36 Time=4.16s (149s) Lock=0.00s (0s) Rows=0.0 (0), 3users@localhost
#
Count: 3 Time=14.43s (43s) Lock=0.00s (0s) Rows=0.0 (0), kero_master[kero_master]@localhost
SET NAMES latin1
Count: 3 Time=5.73s (17s) Lock=0.00s (0s) Rows=13531.0 (40593), thepat_master[thepat_master]@localhost
SELECT * FROM wp_comments WHERE comment_post_ID = N AND comment_approved = 'S' ORDER BY comment_date_gmt ASC
Count: 4 Time=2.83s (11s) Lock=0.00s (0s) Rows=0.0 (0), thepat_master[thepat_master]@localhost
SELECT option_value FROM wp_options WHERE option_name = 'S' LIMIT N
Count: 2 Time=3.06s (6s) Lock=0.02s (0s) Rows=269.0 (538), debian-sys-maint[debian-sys-maint]@localhost
select concat('S',
TABLE_SCHEMA, 'S', TABLE_NAME, 'S')
from information_schema.TABLES where ENGINE='S'
Count: 3 Time=1.95s (5s) Lock=0.94s (2s) Rows=5.0 (15), thepat_master[thepat_master]@localhost
SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE N=N AND wp_posts.post_type = 'S' AND (wp_posts.post_status = 'S') ORDER BY wp_posts.post_date DESC LIMIT N, N
Count: 2 Time=2.32s (4s) Lock=0.00s (0s) Rows=0.0 (0), debian-sys-maint[debian-sys-maint]@localhost
select count(*) into @discard from `information_schema`.`PARTITIONS`
Count: 1 Time=3.29s (3s) Lock=0.11s (0s) Rows=1.0 (1), kero_master[kero_master]@localhost
SELECT post_modified_gmt FROM wp_posts WHERE post_status = 'S' AND post_type IN ('S', 'S', 'S') ORDER BY post_modified_gmt DESC LIMIT N
Count: 1 Time=1.61s (1s) Lock=0.00s (0s) Rows=0.0 (0), thepat_master[thepat_master]@localhost
SELECT * FROM wp_posts WHERE ID = N LIMIT N
I've got no idea who thepat_master or kero_master is..same with 2users@localhost. Has my server been compromised or is it some rouge plugin (wordpress sites) causing the issues. I've searched kero_master and thepat_master but get nothing on the web. And some of these queries look a bit off...
Any help would be appreciated.
Steve