服务器重新启动后,我SHOW processlist
以 root 身份查询,并得到一长串Sleep
线程:
+-----+-------------+-----------------+---------+---------+------+-------+------------------+
| 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 |
+-----+-------------+-----------------+---------+---------+------+-------+------------------+
过了一会儿,睡眠过程消失了。
我应该把这当作一个问题吗?
对我来说,使用“mastersuser”帐户连接的应用程序似乎没有正确关闭连接,所以是的,我会说这是一个问题。它们可能会在到达
wait_timeout
或interactive_timeout
设置后消失。一个权限问题阻止了 MySQL 从 开始
InnoDB
,所以它默默地退回到MyIsam
,它不能很好地处理并发更新。