title: PHP Keeping a PDO ATTR_PERSISTENT connection alive
body: <p>I am running an endless PHP Script with PDO Persistent Connection like this:</p>
  
  <pre><code>$conn=new PDO(
    'mysql:host=127.0.0.1','user','pass', array(PDO::ATTR_PERSISTENT =&gt; true)
  );
  </code></pre>
  
  <p>The mySQL <code>wait_timeout</code> variable is set to <code>28800</code> and I left the script on idle for 12 hours for test purposes; and the connection is dropped automatically so I presume the <code>PDO::ATTR_PERSISTENT</code> attribute is superseded by the system variable <code>wait_timeout</code>.</p>
  
  <p>So I was wondering whether theres a setting or another PHP method to keep the connection breathing as long as the PHP script is running and whether or not that would be a good practice.</p>
  
  <p>My plan B would be executing a resource-less mySQL query every 60 minutes to reset the clock.</p>
  
  <p><em>OS: 4GB RAM VPS Debian 64 Bit SSD</em></p>