title: mysql_ping hangs with Amazon RDS
body: <p>I am trying to make a persistent connection to MySQL RDS database from a php worker running on an external ubuntu server. As a part of connection, i first check for "mysql_ping". If the ping returns true, then use the current connection, else make a new connection.</p>
  
  <p>The problem that I am facing is that when I start my worker, the connection establishes fine, and works well for some time, i.e. I can make repeated queries to the RDS database sucessfully. However around 15 minutes later, if I make a request, then the "mysql_ping" hangs, and consequently the php script itself hangs. On further debugging, I found that the mysql_ping response came back as false after 936 seconds.</p>
  
  <p>The required permissions for db access from external server are there and during all this time (while the script is hanging), I am able to successfully connect to the RDS database using mysql command line options. Also, if I kill the worker and restart it again, it is able to connect successfully once again, but the problem comes back after 15 minutes or so.</p>
  
  <p>Is there anything that needs to be changed in the RDS server settings to avoid this problem??</p>
  
  <p>Regards,
  Kapil</p>