Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Enabling connection pooling by default


  • From: "Andrus" <kobruleht2(at)hot(dot)ee>
  • To: pgsql-odbc(at)postgresql(dot)org
  • Subject: Re: Enabling connection pooling by default
  • Date: Tue, 21 Oct 2008 12:18:53 +0300
  • Message-id: <gdk6q0$217q$1@news.hub.org> <text/plain>

Adam,

If your ADSL modem is also your router, and you are using NAT, then it
is not killing your connection. It is merely removing it from active
connection queue after 3 min or so of no activity.

If your ADSL modem is not a router, and "disconnects" your connection,
then the ADSL modem is broken. If you have a NAT outside the modem,
then it is the NAT that is timing out, not the modem.

TCP_KEEPALIVE messages are only useful when you have a non-public IP
and/or using NAT and/or want PostgreSQL to close connections where the
client has disappeared.

Thank you.
I have the following typical configuration:

Server:

Windows computer inside LAN.
Router (Linksys, SpeedTouch etc) DHCP has programmed to assign fixed IP address to server or fixed local IP address is assigned to server manually.
Router has public IP address assigned by ISP.
Router has programmed to forward 5432 port to server into LAN

Client:

There is similar one router in LAN which is used also to share public internet connection.
Client router has dynamic public IP address. Client OS is Windows.

Is it possible to use this:

1. Configure something to remove 3 min NAT active connection timeout ? Should I configure client or server ?
I havent found such option in routers.
2. Use TCP_KEELALIVEs
3. Use ping -t or some external program or website which simulates activity
4. Close and re-open connection.

Which is the best way to prevent connection loss in this case if there is no activity for a long time ?

Andrus.



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group