处于TIME_WAIT状态的Mysql连接

时间:2013-04-01 13:56:01

标签: mysql connection timeout wait pooling

我在服务器中遇到一个问题,其中几个连接正在超时。以下是错误文件中的错误: -

130401  8:07:06 [Warning] Aborted connection 1111111to db: 'ABC' user: 'u1' host: '1.1.1.1' (Got timeout reading communication packets)
130401  8:10:44 [Warning] Aborted connection 1712056 to db: 'XYZ' user: 'u2' host: '2.2.2.2.' (Got an error reading communication packets)

以下是配置

wait_timeout= 900
max_connections                         | 500
max_packet_size                           256M

虽然历史最大连接数尚未达到320以上,但我们看到许多连接使用命令在TIME_WAIT中:

netstat -anlp | grep :3306 | grep TIME_WAIT -wc; date
299

在应用程序端,如果连接空闲超过600秒,客户端将关闭连接。

这意味着许多连接处于等待状态。同时,服务器不忙。这意味着它没有处于锁定状态。

有人可以帮我这个吗?提前谢谢。

斯里达尔。

0 个答案:

没有答案