We have an older cron script written in PHP that runs for months at a time. It is still using mysql_pconnect to connect to the MySQL server. The connection to MySQL is started when the script starts and it only connects once. After several months, this script will eventually fail because the MySQL-link Resource is no longer valid. I'm having a hard time searching on what the maximum lifetime of this connection is or how to change it.
Example warnings:
Warning: mysql_close(): -2147483648 is not a valid MySQL-Link resource in /home/savvior/powerbuy/library/dblayer.php on line 29
Warning: mysql_select_db(): -2147483648 is not a valid MySQL-Link resource in /home/savvior/powerbuy/library/dblayer.php on line 2