[Vtigercrm-developers] Handling "[2006]MySQL server has gone away" error?
Alan Lord
alanslists at gmail.com
Fri Nov 14 12:55:57 GMT 2014
I have a customer on a Siteground/CPanel host and when the GeoTools cron
job runs after a certain period or queries (hard to tell which), SELECT,
INSERT or UPDATES fail with the above message.
If it was just one or two it wouldn't be so bad, but the function that
runs my query has a $db = PearDatabase::getInstance() line which should,
if I understand it correctly, either get the existing connection, or, if
it has gone away get a new one...
But my function is failing each time it is called after it has failed
the first time.
Is there a way I can test for a "good" $db object and if it doesn't have
a connection close it and get a new one?
Thanks
Al
More information about the vtigercrm-developers
mailing list