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?
It may be easier to check if the connection and re-establish it if needed.
See PHP:mysqli_ping for info on that.
Good point, if you have a process that is intermittent then its better to release your connection so you don't used up all the connections. Rebuilding the connection is generally cheap. +1
in 2018: mysqli_ping is depricated
@fb what is used to do that with PDO ?