title: MySQL error 2006: mysql server has gone away
body: <p>I'm running a server at my office to process some files and report the results to a remote MySQL server.</p>
  
  <p>The files processing takes some time and the process dies halfway through with the following error: </p>
  
  <pre><code>2006, MySQL server has gone away
  </code></pre>
  
  <p>I've heard about the MySQL setting, <strong>wait_timeout</strong>, but do I need to change that on the server at my office or the remote MySQL server?</p>