I have a server running Ubuntu 12.10 and mysql 5.5. This is the primary database server and has nothing else running on it. 2 websites I have use it (both fairly high traffic).
The mysql service went down the other day. I got no errors, it just wouldn't connect until I restarted the service service mysql restart
.
Everything was fine after that until this morning at 5am.
Mysql service went down again, this time with the error
SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading authorization packet', system error: 0
So I restarted the service and it was fine again.
I have read the docs and it says to increase the connect_timeout
global variable to 10 . It was already on 10 so I increased it to 30 .
Then 5 hours later it is down again with the same error as above.
Anyone have any advice before I give up and use a PaaS?
This old bug log reports many people experiencing the same error: Bug #28359 Intermitted lost connection at 'reading authorization packet' errors .
MySQL recommended to increase connect_timeout
and then they closed the bug, despite many people continuing to report the error against many versions of MySQL, even when connect_timeout
was increased to a much larger value, up to 240 seconds.
There are some patterns among the reports in the bug log and elsewhere:
Error occurs more when the network traffic is high. Other heavy traffic (like a big rsync) may cause network packet checksums to fail. Increasing network bandwidth seems to help.
Decreasing DNS traffic by setting skip-name-resolve
config option was reported to help in one case.
Several reports that sites using bind_address=127.0.0.1
had failures, and when they removed that restriction, the errors vanished. Perhaps suggesting a fault in the loopback ethernet driver? I'm speculating here.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.