Page 1 of 1

Reconnect database

Posted: Thu Jan 12, 2012 2:19 pm
by mikatchu
Hi,

I'd like to know if there is a way to close and reconnect the database connection during the execution of a module action ?

Here is the problem : I execute a long webservice call in my module, that requires around 60 seconds to achieve.
My website host automatically close the cmsms database connection after 45 seconds.

In cmsms 1.9.x, i used to do that if the 45s limitation was exeeded :

Code: Select all

global $gCms;
$gCms->dbshutdown();
unset($gCms->db);
$gCms->GetDb();
It worked fine.
Now in cmsms 1.10.x, the 'db' object is private, so it's impossible to clear it, and I don't see any method to do that... any idea ?

Thanks
Mika