[pgadmin-support] Keep-alive?

2003-10-08 Thread Mark Rappoport
Perhaps I've missed something - if so, I apologize for wasting the list's time.

Is there some support for keeping PostgreSQL connections alive?
That is, I often start PGAdmin and leave it idle in the background; when I return to 
it, and hit an item in the tree, I get about 10-15 message boxes telling me that the 
server is offline.

Are there any plans to change this functionality?

Thanks.
--
+--
+ Mark A. Rappoport
+ Software Engineer
+ NSA Internet & Security Ltd.
+ +972-68-523-103
+--


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [pgadmin-support] Keep-alive?

2003-10-08 Thread Dave Page


> -Original Message-
> From: Mark Rappoport [mailto:[EMAIL PROTECTED] 
> Sent: 08 October 2003 12:01
> To: [EMAIL PROTECTED]
> Subject: [pgadmin-support] Keep-alive?
> 
> 
> Perhaps I've missed something - if so, I apologize for 
> wasting the list's time.
> 
> Is there some support for keeping PostgreSQL connections 
> alive? That is, I often start PGAdmin and leave it idle in 
> the background; when I return to it, and hit an item in the 
> tree, I get about 10-15 message boxes telling me that the 
> server is offline.
> 
> Are there any plans to change this functionality?

Hi Mark,

Neither pgAdmin nor PostgreSQL implement any kind of connection timeout.
Communication is via a TCP connection which is maintained by the TCP
stack on the client and the server. If you are getting disconnected from
your server, then I would guess that there is something else on your
network causing the problem. Ar you working across any ISDN links or
similar?

Regards, Dave.

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [pgadmin-support] Keep-alive?

2003-10-08 Thread Mark Rappoport
Hi Dave, thanks for the swift reply.

No, we're working on a server in a farm; the local office connection is
a regular ADSL one, going through a Cisco PIX. The farm is about 4 hops
away.
I suppose that the PIX is somehow affecting the connection... There's
probably a multitude of factors affecting this, and I doubt that it's
the fault of the database backend or pgAdmin... 

Regardless, I think that PGAdmin should offer some kind of option to
automagically reconnect if it sees that the connection is no longer
alive. 

Perhaps there are other pgAdmin users experiencing such disconnections,
who would benefit from this?

Anyway, thanks. I'll look into the TCP streams heading in and out of
here and see what's causing this.

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Page
> Sent: Wednesday, October 08, 2003 1:07 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [pgadmin-support] Keep-alive?
> 
> 
> 
> 
> > -Original Message-
> > From: Mark Rappoport [mailto:[EMAIL PROTECTED]
> > Sent: 08 October 2003 12:01
> > To: [EMAIL PROTECTED]
> > Subject: [pgadmin-support] Keep-alive?
> > 
> > 
> > Perhaps I've missed something - if so, I apologize for
> > wasting the list's time.
> > 
> > Is there some support for keeping PostgreSQL connections
> > alive? That is, I often start PGAdmin and leave it idle in 
> > the background; when I return to it, and hit an item in the 
> > tree, I get about 10-15 message boxes telling me that the 
> > server is offline.
> > 
> > Are there any plans to change this functionality?
> 
> Hi Mark,
> 
> Neither pgAdmin nor PostgreSQL implement any kind of 
> connection timeout. Communication is via a TCP connection 
> which is maintained by the TCP stack on the client and the 
> server. If you are getting disconnected from your server, 
> then I would guess that there is something else on your 
> network causing the problem. Ar you working across any ISDN 
> links or similar?
> 
> Regards, Dave.
> 
> ---(end of 
> broadcast)---
> TIP 9: the planner will ignore your desire to choose an index 
> scan if your
>   joining column's datatypes do not match
> 


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [pgadmin-support] Keep-alive?

2003-10-08 Thread Dave Page


> -Original Message-
> From: Mark Rappoport [mailto:[EMAIL PROTECTED] 
> Sent: 08 October 2003 12:19
> To: Dave Page; [EMAIL PROTECTED]
> Subject: RE: [pgadmin-support] Keep-alive?
> 
> 
> Hi Dave, thanks for the swift reply.

Hi Mark, you're welcome.

> No, we're working on a server in a farm; the local office 
> connection is a regular ADSL one, going through a Cisco PIX. 
> The farm is about 4 hops away. I suppose that the PIX is 
> somehow affecting the connection... There's probably a 
> multitude of factors affecting this, and I doubt that it's 
> the fault of the database backend or pgAdmin... 
> 
> Regardless, I think that PGAdmin should offer some kind of 
> option to automagically reconnect if it sees that the 
> connection is no longer alive. 
> 
> Perhaps there are other pgAdmin users experiencing such 
> disconnections, who would benefit from this?

It's never been raised before, but I guess it might be useful, and
probably not too difficult to implement. I'll bung it on the todo list.

> Anyway, thanks. I'll look into the TCP streams heading in and 
> out of here and see what's causing this.

Good luck!

Regards, Dave.

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [pgadmin-support] Keep-alive?

2003-10-08 Thread Adam H. Pendleton
Mark Rappoport wrote:

Hi Dave, thanks for the swift reply.

No, we're working on a server in a farm; the local office connection is
a regular ADSL one, going through a Cisco PIX. The farm is about 4 hops
away.
I suppose that the PIX is somehow affecting the connection... There's
probably a multitude of factors affecting this, and I doubt that it's
the fault of the database backend or pgAdmin... 

Regardless, I think that PGAdmin should offer some kind of option to
automagically reconnect if it sees that the connection is no longer
alive. 

Perhaps there are other pgAdmin users experiencing such disconnections,
who would benefit from this?
Anyway, thanks. I'll look into the TCP streams heading in and out of
here and see what's causing this.
 

Obviously I don't know what is specifically causing your connection 
problems, but I can talk about this in the general sense.  I also have a 
similar problem connecting to my servers from my new work network.  
Existing sessions timeout after a couple of minutes or so.  The timeout 
is transparent to the server end, and on my end I get a FIN/ACK which 
appears to come from the remote machine, but must come from some gateway 
here, because the remote machine has no idea the connection is dropped.  
In my instance KeepAlives inside SSH have no effect, and the connection 
still drops.  Sending data down the connection will keep it alive, though.

A problem to consider with pgAdmin automatically re-opening connections 
with the server is this:  the server has no idea the connection has been 
dropped, so it will keep it open until a TCP timeout occurs (which in my 
experience is a *very* long time).  Since the server keeps these 
connections open, any new connections opened will decrease the number of 
available non-superuser connections to the database.  After a few 
timeouts, you will no longer be able to connect to your database.  Bad 
news!!  This happens quite a bit with my IMAP server which only allows 4 
connections from the same IP address.  On this new work network, if the 
IMAP connections get closed by the firewall (this is an assumption since 
I have no idea what sort of firewall/gateway is in use here -- the 
Internet line is run by a separate company than mine), when my IMAP 
application attemps to open some more, it can no longer make an IMAP 
connection to the server, since the server rejects the new connections 
(> 4).  This means that I have to restart my IMAP server severeal times 
a day, a big pain to say the least.

Network problems like this are usually better solved somewhere other 
than the application, since their impact usually affects more than just 
one application.

ahp

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly


Re: [pgadmin-support] Keep-alive?

2003-10-08 Thread Andreas Pflug
Adam H. Pendleton wrote:

Network problems like this are usually better solved somewhere other 
than the application, since their impact usually affects more than 
just one application. 


I totally agree on that. Additionally, when we implement some kind of 
reconnect we must be quite careful about it, so that a connection that's 
really terminated doesn't cause a bunch of unnecessary and unwanted 
retries (resulting in 10 minutes sitting in front of your machine, 
waiting for it to recover).

I'd rather like to leave this to the network level. If the link is 
broken, there must be a reason for this: either it's intentionally, or 
it's faulty. Both ways need review.

Regards,
Andreas


---(end of broadcast)---
TIP 6: Have you searched our list archives?
  http://archives.postgresql.org


Re: [pgadmin-support] Keep-alive?

2003-10-08 Thread Michiel_Lange

This may very well be a firewall/router thing...
Since the amount of sockets (which are needed for any TCP connection) is
limited, your gateway/firewall may very well delete a socket that has been
idle for a certain amount of time.
There is a ICMP message KeepAlive, which does nothing but send some kind of
ping which keeps the connection alive... You cannot send these messages
outside the application, there would be a new socket made for that, so it
would not help you very much. I think that adding an option to PgAdmin
"send keepalive packages every <##> seconds" would be a valuable
addition...

Michiel



|+>
||  "Mark Rappoport"  |
||  <[EMAIL PROTECTED]>  |
||  Sent by:  |
||  [EMAIL PROTECTED]|
||  gresql.org|
|||
|||
||  08-10-2003 13:18  |
||  Please respond to mark|
|||
|+>
  
>---|
  |
   |
  |   To: "'Dave Page'" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>   
   |
  |   cc:  
   |
  |   Subject: Re: [pgadmin-support] Keep-alive?   
   |
  
>---|




Hi Dave, thanks for the swift reply.

No, we're working on a server in a farm; the local office connection is
a regular ADSL one, going through a Cisco PIX. The farm is about 4 hops
away.
I suppose that the PIX is somehow affecting the connection... There's
probably a multitude of factors affecting this, and I doubt that it's
the fault of the database backend or pgAdmin...

Regardless, I think that PGAdmin should offer some kind of option to
automagically reconnect if it sees that the connection is no longer
alive.

Perhaps there are other pgAdmin users experiencing such disconnections,
who would benefit from this?

Anyway, thanks. I'll look into the TCP streams heading in and out of
here and see what's causing this.

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Page
> Sent: Wednesday, October 08, 2003 1:07 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [pgadmin-support] Keep-alive?
>
>
>
>
> > -Original Message-
> > From: Mark Rappoport [mailto:[EMAIL PROTECTED]
> > Sent: 08 October 2003 12:01
> > To: [EMAIL PROTECTED]
> > Subject: [pgadmin-support] Keep-alive?
> >
> >
> > Perhaps I've missed something - if so, I apologize for
> > wasting the list's time.
> >
> > Is there some support for keeping PostgreSQL connections
> > alive? That is, I often start PGAdmin and leave it idle in
> > the background; when I return to it, and hit an item in the
> > tree, I get about 10-15 message boxes telling me that the
> > server is offline.
> >
> > Are there any plans to change this functionality?
>
> Hi Mark,
>
> Neither pgAdmin nor PostgreSQL implement any kind of
> connection timeout. Communication is via a TCP connection
> which is maintained by the TCP stack on the client and the
> server. If you are getting disconnected from your server,
> then I would guess that there is something else on your
> network causing the problem. Ar you working across any ISDN
> links or similar?
>
> Regards, Dave.
>
> ---(end of
> broadcast)---
> TIP 9: the planner will ignore your desire to choose an index
> scan if your
>   joining column's datatypes do not match
>


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly




---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [pgadmin-support] Keep-alive?

2003-10-08 Thread Adam H.Pendleton
On Wednesday, Oct 8, 2003, at 07:27 US/Eastern, 
[EMAIL PROTECTED] wrote:

I think that adding an option to PgAdmin
"send keepalive packages every <##> seconds" would be a valuable
addition...
I think this would be a much more viable solution than re-connecting to 
the database.

ahp

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
  http://www.postgresql.org/docs/faqs/FAQ.html