-
1. Re: Communication link failure
davidjencks Oct 14, 2001 1:15 PM (in response to twilight)A lot of dbs /drivers kill their connections after a period of inactivity.
You need to set some pool parameters to take care of this... I made it a little easier in 3.0
As I recall(from memory)in 2.4 you set
idle timeout maybe 1/2 the time before the db kills the connection
idletimeout enabled true
GCEnabled true
you probably need a GCinterval too, but set it high.
"GCEnabled" is misleading: it needs to be true or idle timeout stuff is ignored. Hopefully this is all you need. -
2. Re: Communication link failure
twilight Oct 14, 2001 3:45 PM (in response to twilight)Thanks a lot for your reply.
Just after I made my initial post I checked the wait_timeout variable in MySQL - the time it takes before idle connections are terminated. This variable was set to 8 hours. Maybe it could help to just increase that one? I set it to 12 hours anyways... By:
> idle timeout maybe 1/2 the time before the db kills the connection
You mean about 1/2 of 12 hours then? As that is what I set the MySQL wait_timeout value to? And one last thing:
> you probably need a GCinterval too, but set it high.
Default is 2 minutes, what is considered "high"? 30 minutes?
Thanks yet again! Regards,
\Anders -
3. Re: Communication link failure
davidjencks Oct 15, 2001 12:29 AM (in response to twilight)Thinking a bit more... I think you just need idle timeout + gc interval slightly less than db idle timeout. GC is kind of useless, shouldn't be used IMHO in j2ee apps, so you might as well set them both to say 45% of the db timeout.