Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Daevid Vincent (daeviddaevid.com)
Date: Wed Dec 03 2008 - 16:37:41 CST
If this is a web app, then it should be making a new connection every
time a page is loaded (where applicable). At least that's how every PHP
site I've ever made works...
If this is a stand alone app, if your language has threads you could
(hackily) have a thread that does some "NO-OP" every hour (or some other
interval) to the database. This should keep the connection alive. If
there aren't threads, then you may have to test for the connection first
then do your queries. This can be optimized by storing a unix timestamp
and if you know it fails after some duration (like 6 hours of
inactivity) then you can compare timestamps as a shortcut. Again, this
is all very hacky.
I've run into this kind of BS behavior with a Ruby application that used
It's lame that the database wrapper isn't smart enough to detect the
connection has gone away and fire a new one up transparently for you.
Tell Pesty, Mort, Hungry Joe, Jane, Toughie and Walkie Talkie I said,
On Wed, 2008-12-03 at 13:42 -0800, Bazooka Joe wrote:
> I am trying to develop an db app w/ OO base as the front end to mysql
> db that is running on the web in a shared hosting environment using
> jdbc as the connector.
> The problem is if I let OO base sit for a few minutes it looses the
> connection to the db and I have to restart OO base to get it to
> Not only is this a major pain but if I can't fix it I can't expect my
> client to constantly be restarting the OO base.
> All I have found on the web is to increase the interactive timeout but
> it is at 28,800 now. So that isn't it.
> Any ideas?
> I am using:
> OO v3 on windows
> jdbc v5.1.7
> mysqld v5.0.45