mysql processlist
I was looking thru it and I have a lot of processes in there that's all in SLEEP mode. What's the deal with that? Some have been sleeping for more than 10 minutes. They are taking up a lot of connections to mysql? Is that a program error or mysql config error?I've never looked at it before, so I don't know if they've always been like that. THe only reason I looked was because I had to restart MySQL because there were too many connections to it and nothing else could get in.
There's about 20 in there that's accessing the db for this (http://sourceforge.net/projects/novasystem) game. There's a few more that's accessing another db.
They don't appear to go away on their own. I have to manually kill them. Is there a timeout setting somewhere?
Code:
mysql> show processlist; +-----+----------+---------------+------------+---------+------+-------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +-----+----------+---------------+------------+---------+------+-------+------------------+ | 7 | gamesdb | 127.0.0.1 | ngs | Sleep | 349 | | NULL | | 8 | gamesdb | 127.0.0.1 | ngs | Sleep | 1320 | | NULL | | 14 | gamesdb | 127.0.0.1 | ngs | Sleep | 1320 | | NULL | | 15 | gamesdb | 127.0.0.1 | ngs | Sleep | 1320 | | NULL | | 17 | gamesdb | 127.0.0.1 | ngs | Sleep | 1320 | | NULL | | 19 | gamesdb | 127.0.0.1 | ngs | Sleep | 1320 | | NULL | | 22 | gamesdb | 127.0.0.1 | ngs | Sleep | 948 | | NULL | | 24 | gamesdb | 127.0.0.1 | ngs | Sleep | 1319 | | NULL | | 26 | gamesdb | 127.0.0.1 | ngs | Sleep | 1319 | | NULL | | 28 | gamesdb | 127.0.0.1 | ngs | Sleep | 1319 | | NULL | | 29 | gamesdb | 127.0.0.1 | ngs | Sleep | 1319 | | NULL | | 30 | gamesdb | 127.0.0.1 | ngs | Sleep | 848 | | NULL | | 36 | gamesdb | 127.0.0.1 | ngs | Sleep | 1311 | | NULL | | 37 | gamesdb | 127.0.0.1 | ngs | Sleep | 1311 | | NULL | | 42 | gamesdb | 127.0.0.1 | ngs | Sleep | 1311 | | NULL | | 43 | gamesdb | 127.0.0.1 | ngs | Sleep | 1311 | | NULL | | 179 | gamesdb | 127.0.0.1 | ngs | Sleep | 955 | | NULL | | 203 | user2 | 127.0.0.1 | asdf | Sleep | 892 | | NULL | | 248 | user2 | 127.0.0.1 | asdf | Sleep | 691 | | NULL | | 250 | gamesdb | 127.0.0.1 | ngs | Sleep | 647 | | NULL | | 271 | user2 | 127.0.0.1 | asdf | Sleep | 489 | | NULL | | 307 | root | localhost | NULL | Query | 0 | NULL | show processlist | | 348 | gamesdb | 127.0.0.1 | ngs | Sleep | 38 | | NULL | +-----+----------+---------------+------------+---------+------+-------+------------------+ 23 rows in set (0.01 sec) mysql>