Connection timeouts
Hi all. I have a couple of serverprograms running on my Linuxbox that
has a connection open to a MySQL (5.0.18) database. These serverprograms
doesnt work much :-), they get called by clients once in a while,
sometimes it can be days between they have to do any work. When they are
started they connect to the MySQL database and then they wait for a
client to connect to them and command the server to work vs the
database. So, I want the connection to stay alive all the time, but this
seems a bit hard...I have tried to set the MYSQL_OPT_RECONNECT to true
before issuing the 'mysql_real_connect' call (I'm using the C-api) but
that doesnt seem to work. The servers gets the
"--:*MySQL server has gone away"
back after a while.
Is there a way to keep a connection alive for a *very* long time if
desired ?
Thanx
/ZW
|