Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.postgresql > #440

Re: Preventing a timeout on a connection

From "M. Strobel" <sorry_no_mail_here@nowhere.dee>
Newsgroups comp.databases.postgresql
Subject Re: Preventing a timeout on a connection
Date 2013-02-28 11:03 +0100
Message-ID <ap8ob5Fmi92U1@mid.uni-berlin.de> (permalink)
References <6f9ui8pi4ub903fl62kgg4t6793c5ph7b7@4ax.com>

Show all headers | View raw


Am 28.02.2013 10:41, schrieb gargoyle60:
> In one of my background applications I keep getting a peer communication error stating that a
> timeout occurred on a connection.
> 
> The program runs for most of the day processing background statistics. It has an open "connected"
> connection but not always an active session on that connection, which is why I believe that the
> timeout occurs because it is sitting idle. The timeout is not on a SQL statement or similar, but on
> the idle connection.
> 
> Is there a specific parameter in one of the conf files or elsewhere that would help extend any
> idle/timeout period (I've looked in the documentation but haven't been able to find anything
> specific to connections alone).
> 
> I am using postgres 9.0.4 on Windows XP Home SP3.

I am following a different strategy, you might consider it:

I do a timeout myself and close the connection on inactivity, the app sitting there
on the desktop idle during lunch.

Every use of the connection handle is encapsulated in a proc checking if it is
connected, and connecting if not. I think this is a robust approach that might help
as well with unstable network connections.

/Str.

Back to comp.databases.postgresql | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Preventing a timeout on a connection gargoyle60 <gargoyle60@example.invalid> - 2013-02-28 09:41 +0000
  Re: Preventing a timeout on a connection "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-02-28 11:03 +0100
  Re: Preventing a timeout on a connection Jasen Betts <jasen@xnet.co.nz> - 2013-02-28 11:00 +0000
  Re: Preventing a timeout on a connection gargoyle60 <gargoyle60@example.invalid> - 2013-03-01 13:16 +0000

csiph-web