9

In pgAdmin, if I'm connecting to a host and leave it idle for a few minutes, the connection drops, and I have to reconnect again. On many occasions pgAdmin also hangs when I try to reconnect, so I have to force close it and open it again.

This is very annoying. Is there a way to keep alive the connection in pgAdmin?

1
  • 1
    Sounds like you're connecting to a machine through a NAT router, a proxy, or some other kind of connection tracking system. If so, Andrew is right and you need to set up TCP keepalives. Commented Jul 22, 2013 at 3:08

2 Answers 2

7

That's configured from the server - the the tcp_keepalives_* settings

at http://www.postgresql.org/docs/8.3/static/runtime-config-connection.html

1
  • 2
    Do you know if this can bring performance issues in a production environment? Commented Feb 13, 2015 at 13:35
2

Actually I think there are two issues here. 1. The keep alive of the connection on the db server 2. The problem of your service provider closing idle tcp connections. In my case Pgadmin needs to ping the server so that the tcp connection remains active. I discovered this after changing internet providers.

There is a solution to this posted here Any way to keep connection alive in pgAdmin without setting it on the server?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .