Page 1 of 1

mysql5 and zeos 6.6: keep connection alive?

Posted: 27.07.2011, 14:41
by baurat
Hi,
I'm reactivating an old databaseproject I did some years ago, now using zeos 6.6.5 and mysql 5 with Delphi 6 prof.
Everything works fine, but after some minutes with no queries or transactions, the mysql connections goes away. Unfortunately I do not find something like a "keep alive" property in ZConnection.

How can I make sure that the connection is still alive even after 15 minutes?

Thanks in advance!
Regards
Heiko

Posted: 27.07.2011, 18:05
by guidoaerts
try setting the option : MYSQL_OPT_CONNECT_TIMEOUT
then there would be something like a persistent connection to mysql, but i dont know if zeos supports it.
guido

Posted: 31.10.2011, 00:14
by mdaems
This property is supported.
conn.Properties.Add('MYSQL_OPT_CONNECT_TIMEOUT=500');
or
conn.Properties.Add('timeout=500');

This probably also depends on the max timeout set on the server!

Mark