View previous topic :: View next topic |
Author |
Message |
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Thu Jul 17, 2008 23:51 Post subject: Database Went away |
|
|
I have had this issue for a long time. I found a thread here about a DB ping, and this is the script, but it still goes away.
OnModLoad
Code: | ExecuteScript("db_keepalive", OBJECT_SELF);//Script to keep database connected |
db_keepalive
Code: | #include "aps_include"
void main()
{
SQLExecDirect("SELECT 1");
DelayCommand(150.0, ExecuteScript("db_keepalive", GetModule()));
} |
|
|
Back to top |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Thu Jul 17, 2008 23:59 Post subject: |
|
|
Code: | 1216331873 o ERROR: DB went away |
|
|
Back to top |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Fri Jul 18, 2008 0:33 Post subject: |
|
|
in hind sight, i put this in the wrong forum
feel free to move |
|
Back to top |
|
|
TroveLord
Joined: 22 Nov 2006 Posts: 136 Location: Italy
|
Posted: Fri Jul 18, 2008 1:36 Post subject: |
|
|
I'm using a 60 seconds delay and it works. |
|
Back to top |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Fri Jul 18, 2008 9:46 Post subject: |
|
|
60 seconds seems to work |
|
Back to top |
|
|
|