MySQL - How to diagnose cause of warning “Aborted connection - (Got timeout reading communication packets)”

六月ゝ 毕业季﹏ 提交于 2021-01-27 04:00:19

问题


I'm having some problems on our fairly busy Windows 2008 R2 web server, running MySQL.

Applications are intermittently crashing, and logs are commonly pointing to MySQL as a route cause, in that the applications cannot connect to MySQL. This is not affecting all users, just a few unlucky ones.

Having turned on warning logging in MySQL, I am seeing repeated logs of the following warning:

[Warning] Aborted connection 7153 to db user: 'XXXX' host: 'XXXXXX' (Got timeout reading communication packets)

The docs here http://dev.mysql.com/doc/refman/5.0/en/communication-errors.html suggest a range of potential network related causes.

Some of the configuation under "Advanced Networking":

Max Packet Size: 128 M (We increased this from 64 M yesterday) Wait timeout: 20 Max Connections: 1000 Max Conn per: 1000 Retry count: 5

My question is, how can I better diagnose what is causing this issue, rather than just playing with settings and waiting?

Thanks in advance


回答1:


This was a tricky issue to solve, but we eventually found a couple of thousand apparently orphaned TCP connections open (using Task Manager > Resource Monitor), which had been generated by an email send process.

Since MySQL connections are TCP dependent, the db server was suffering as a result.



来源:https://stackoverflow.com/questions/11860486/mysql-how-to-diagnose-cause-of-warning-aborted-connection-got-timeout-read

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!