title: WordPress database error MySQL server has gone away for query
body: <p>I get this error so frequently that the php_error log file increases 1MB every 2 seconds.
  and the site is very slow.</p>
  
  <p>I have tried to add this line to wp-db.php</p>
  
  <pre><code>$this-&gt;query("set session wait_timeout=600" );
  </code></pre>
  
  <p>but it did not help.</p>
  
  <p>The web server is IIS 7, latest version of mysql and wordpress</p>