gpt4 book ai didi

Mysql show processlist 列出许多进程sleep and info = null?

转载 作者:IT老高 更新时间:2023-10-29 00:16:01 31 4
gpt4 key购买 nike

我正在向连接到 mysql 服务器的 Web 应用程序注入(inject)压力测试,并且我正在监视 mysql 的显示进程列表。

当负载很高(高交换 i/o)时,我会得到很多这样的进程:

| 97535 | db| localhost | userA | Sleep   |  515 |         | NULL 
| 97536 | db| localhost | userA | Sleep | 516 | | NULL
| 97786 | db| localhost | userA | Sleep | 343 | | NULL
| 97889 | db| localhost | userA | Sleep | 310 | | NULL

但我不明白为什么他们还在那里并且没有被杀死?这最终会导致我的应用使用所有 max_connections 并停止处理传入请求...

知道这些过程是什么以及它们在那里做什么:) 吗?

最佳答案

那些是客户端持有的空闲连接。您应该确保您使用的任何客户端库(JDBC,...)都配置为不会长时间保持未使用的连接打开,或者您的 # clients * max # of connections 不是太大。

关于Mysql show processlist 列出许多进程sleep and info = null?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4053744/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com