time out and connection resume

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
muthuhk
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 23.03.2006, 08:20

time out and connection resume

Post by muthuhk »

Hai

i have problem in time out , for postgresql server, if we dont use for 30min connection to server will be droped.
how to disable time out?

if internet connection droped , i have to reconnect again, is there any way to reconneect & resume


muthu
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

Have no idea, but I had a similar problem once and I used a dirty trick. A timer for every 5 minuters and an SQL "Select 1"... It still works today, after 5 years.. :)
muthuhk
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 23.03.2006, 08:20

Post by muthuhk »

thanks for your reply , i am try to use some timer , refresh query works find, but i think there is some option in zconnection parameter , any idea about this.

is there any way to resume broken connection ?
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

Could be a server setting? I don't know much about PostgreSQL, but in MySQL there's a connection_timeout variable. I'm pretty sure that it's also in other servers (well, maybe with another name). This way you can set a connection time (example) 12 hrs.
btrewern
Expert Boarder
Expert Boarder
Posts: 193
Joined: 06.10.2005, 18:51

Post by btrewern »

There is a statement_timeout variable but I don't think there is a connection timeout setting for PostgreSQL These type of problems always seem to be related to router / network problems and the SELECT 1; type of work around is often used.

Regards,

Ben
muthuhk
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 23.03.2006, 08:20

connectino resume

Post by muthuhk »

ZConnection.Properties.Add('isc_tpb_concurrency');
ZConnection.Properties.Add('isc_tpb_wait');
is there any option like this for postgres?
for connection resume? how to find if connection droped , even after connection to server droped still connected shows True?
Post Reply