Random “Lost connection to MySQL server at 'reading initial communication packet', system error: 110”

StackOverflow https://stackoverflow.com/questions/11724988

문제

I have a website which connects to a DB remotely, this has been the case for well over a year and i haven't had any issues.

However when browsing the website today i noticed the mysql connection seemingly timing out. Sometimes the page loads perfectly fine then other times it generates the following warning.

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at    'reading initial communication packet', system error: 110 in xxx/mysql_info.php on line 7
Lost connection to MySQL server at 'reading initial communication packet', system error: 110 - It seems we are having a slight technical issue, please check back soon.

I'm at a bit of a loss due to the sporadic nature of it. I have control over both the DB server and the hosting server, i haven't changed any settings on either.

Any ideas?

도움이 되었습니까?

해결책

It looks like error # 110 is connection timed out. It could be a DNS or routing related issue, or your database server could be having some intermittent problems. I'd do a backup on the database asap, then look at fsck to see if the disks are ok, and do some ping and network tests to see if its reachable from your web server.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top