3

I've queried SHOW processlist as root after a server restert, and got a long list of Sleep threads:

+-----+-------------+-----------------+---------+---------+------+-------+------------------+
| Id  | User        | Host            | db      | Command | Time | State | Info             |
+-----+-------------+-----------------+---------+---------+------+-------+------------------+
| 217 | root        | localhost       | masters | Sleep   |  371 |       | NULL             |
| 251 | mastersuser | localhost:50883 | masters | Sleep   |  297 |       | NULL             |
| 252 | mastersuser | localhost:50884 | masters | Sleep   |  297 |       | NULL             |
| 253 | mastersuser | localhost:50885 | masters | Sleep   |  297 |       | NULL             |
| 254 | mastersuser | localhost:50891 | masters | Sleep   |  296 |       | NULL             |
| 261 | mastersuser | localhost:50897 | masters | Sleep   |  281 |       | NULL             |
| 260 | mastersuser | localhost:50896 | masters | Sleep   |  281 |       | NULL             |
| 262 | mastersuser | localhost:50899 | masters | Sleep   |  281 |       | NULL             |
| 263 | mastersuser | localhost:50900 | masters | Sleep   |  280 |       | NULL             |
| 272 | mastersuser | localhost:50908 | masters | Sleep   |  263 |       | NULL             |
| 273 | mastersuser | localhost:50909 | masters | Sleep   |  263 |       | NULL             |
| 274 | mastersuser | localhost:50911 | masters | Sleep   |  263 |       | NULL             |
| 275 | mastersuser | localhost:50912 | masters | Sleep   |  263 |       | NULL             |
| 287 | mastersuser | localhost:52434 | masters | Sleep   |  242 |       | NULL             |
| 288 | mastersuser | localhost:52435 | masters | Sleep   |  242 |       | NULL             |
| 289 | mastersuser | localhost:52436 | masters | Sleep   |  242 |       | NULL             |
| 290 | mastersuser | localhost:52437 | masters | Sleep   |  242 |       | NULL             |
| 296 | mastersuser | localhost:52445 | masters | Sleep   |  233 |       | NULL             |
| 298 | mastersuser | localhost:52446 | masters | Sleep   |  232 |       | NULL             |
| 299 | mastersuser | localhost:52447 | masters | Sleep   |  232 |       | NULL             |
| 300 | mastersuser | localhost:52448 | masters | Sleep   |  232 |       | NULL             |
| 301 | mastersuser | localhost:52449 | masters | Sleep   |  231 |       | NULL             |
| 308 | mastersuser | localhost:52453 | masters | Sleep   |  219 |       | NULL             |
| 315 | mastersuser | localhost:52457 | masters | Sleep   |  210 |       | NULL             |
| 316 | mastersuser | localhost:52458 | masters | Sleep   |  210 |       | NULL             |
| 317 | mastersuser | localhost:52459 | masters | Sleep   |  210 |       | NULL             |
| 319 | mastersuser | localhost:52460 | masters | Sleep   |  210 |       | NULL             |
| 330 | mastersuser | localhost:52468 | masters | Sleep   |  196 |       | NULL             |
| 331 | mastersuser | localhost:52469 | masters | Sleep   |  196 |       | NULL             |
...
| 436 | mastersuser | localhost:52547 | masters | Sleep   |   47 |       | NULL             |
| 468 | root        | localhost       | masters | Query   |    0 | NULL  | SHOW processlist |
+-----+-------------+-----------------+---------+---------+------+-------+------------------+

After a while, the sleep processes are gone.

Should I regard this as a problem?

4

To me, it seems like an application connecting using the 'mastersuser' account is not properly closing connections, so yes I'd say it's a problem. They likely disappear after reaching the wait_timeout or interactive_timeout setting.

| improve this answer | |
  • Yep. I imagine that this will not be a significant problem until these sleeping connections push him over max_connections. – Sammitch Nov 14 '12 at 21:47
0

A permissions problem prevented MySQL from starting with InnoDB, so it silently fell back to MyIsam, which doesn't handle concurrent updates very well.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.