Warm tip: This article is reproduced from serverfault.com, please click

MySQL error 2006: mysql server has gone away

发布于 2011-10-29 22:44:09

I'm running a server at my office to process some files and report the results to a remote MySQL server.

The files processing takes some time and the process dies halfway through with the following error:

2006, MySQL server has gone away

I've heard about the MySQL setting, wait_timeout, but do I need to change that on the server at my office or the remote MySQL server?

Questioner
floatleft
Viewed
0
2,597 2015-05-14 22:46:03

It may be easier to check if the connection and re-establish it if needed.

See PHP:mysqli_ping for info on that.