pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Connection time out
8+ messages / 6 participants
[nested] [flat]

* Connection time out
@ 2003-10-28 08:33  Lemasson Sylvain <s.lemasson@mak-system.net>
  0 siblings, 1 reply; 8+ messages in thread

From: Lemasson Sylvain @ 2003-10-28 08:33 UTC (permalink / raw)
  To: pgsql-jdbc

Hi,
   where can we set the time-out of a connection ?.


Lemasson Sylvain

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Connection time out
@ 2003-10-28 11:23  Paul Thomas <paul@tmsl.demon.co.uk>
  parent: Lemasson Sylvain <s.lemasson@mak-system.net>
  0 siblings, 1 reply; 8+ messages in thread

From: Paul Thomas @ 2003-10-28 11:23 UTC (permalink / raw)
  To: Lemasson Sylvain <s.lemasson@mak-system.net>; +Cc: pgsql-jdbc


On 28/10/2003 08:33 Lemasson Sylvain wrote:
> Hi,
>    where can we set the time-out of a connection ?.

DriverManager.setLoginTimeout(int seconds);

-- 
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller 
Business |
| Computer Consultants         | 
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Connection time out
@ 2003-10-28 14:21  Lemasson Sylvain <s.lemasson@mak-system.net>
  parent: Paul Thomas <paul@tmsl.demon.co.uk>
  0 siblings, 2 replies; 8+ messages in thread

From: Lemasson Sylvain @ 2003-10-28 14:21 UTC (permalink / raw)
  To: pgsql-jdbc

Thank you for your reply thomas, but the setLoginTimout concernes the time a
driver wait while attempting to connect to a database. My question was about
the live time of a connection. I mean when we get a connection, postgres
reset the connection after a time out ("connection reset by peer" error
message). I want to set this time out to infinit but I do not know how.

Lemasson Sylvain
Ingénieur développeur
s.lemasson@mak-system.net
tel: 01.48.63.27.27
MAK-SYSTEM SERVICES
Groupe MAK-SYSTEM
Paris Nord 2 - 13, rue de la Perdrix
BP 50035-95946 Roissy CDG Cédex
FRANCE
----- Original Message ----- 
From: "Paul Thomas" <paul@tmsl.demon.co.uk>
To: "Lemasson Sylvain" <s.lemasson@mak-system.net>
Cc: "pgsql-jdbc @ postgresql . org" <pgsql-jdbc@postgresql.org>
Sent: Tuesday, October 28, 2003 12:23 PM
Subject: Re: [JDBC] Connection time out


>
> On 28/10/2003 08:33 Lemasson Sylvain wrote:
> > Hi,
> >    where can we set the time-out of a connection ?.
>
> DriverManager.setLoginTimeout(int seconds);
>
> -- 
> Paul Thomas
>
+------------------------------+--------------------------------------------
-+
> | Thomas Micro Systems Limited | Software Solutions for the Smaller
> Business |
> | Computer Consultants         |
> http://www.thomas-micro-systems-ltd.co.uk   |
>
+------------------------------+--------------------------------------------
-+
>





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Connection time out
@ 2003-10-28 15:42  Dave Cramer <Dave@micro-automation.net>
  parent: Lemasson Sylvain <s.lemasson@mak-system.net>
  1 sibling, 0 replies; 8+ messages in thread

From: Dave Cramer @ 2003-10-28 15:42 UTC (permalink / raw)
  To: Lemasson Sylvain <s.lemasson@mak-system.net>; +Cc: pgsql-jdbc

Lemasson,

I would check to make sure that you don't have a firewall between you
and the database. As far as I know the default is infinite.

Check the archives for "dropping connections"

Dave
On Tue, 2003-10-28 at 09:21, Lemasson Sylvain wrote:
> Thank you for your reply thomas, but the setLoginTimout concernes the time a
> driver wait while attempting to connect to a database. My question was about
> the live time of a connection. I mean when we get a connection, postgres
> reset the connection after a time out ("connection reset by peer" error
> message). I want to set this time out to infinit but I do not know how.
> 
> Lemasson Sylvain
> Ingénieur développeur
> s.lemasson@mak-system.net
> tel: 01.48.63.27.27
> MAK-SYSTEM SERVICES
> Groupe MAK-SYSTEM
> Paris Nord 2 - 13, rue de la Perdrix
> BP 50035-95946 Roissy CDG Cédex
> FRANCE
> ----- Original Message ----- 
> From: "Paul Thomas" <paul@tmsl.demon.co.uk>
> To: "Lemasson Sylvain" <s.lemasson@mak-system.net>
> Cc: "pgsql-jdbc @ postgresql . org" <pgsql-jdbc@postgresql.org>
> Sent: Tuesday, October 28, 2003 12:23 PM
> Subject: Re: [JDBC] Connection time out
> 
> 
> >
> > On 28/10/2003 08:33 Lemasson Sylvain wrote:
> > > Hi,
> > >    where can we set the time-out of a connection ?.
> >
> > DriverManager.setLoginTimeout(int seconds);
> >
> > -- 
> > Paul Thomas
> >
> +------------------------------+--------------------------------------------
> -+
> > | Thomas Micro Systems Limited | Software Solutions for the Smaller
> > Business |
> > | Computer Consultants         |
> > http://www.thomas-micro-systems-ltd.co.uk   |
> >
> +------------------------------+--------------------------------------------
> -+
> >
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
>                http://archives.postgresql.org
> 
-- 
Dave Cramer <Dave@micro-automation.net>




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Connection time out
@ 2003-10-28 15:55  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Lemasson Sylvain <s.lemasson@mak-system.net>
  1 sibling, 0 replies; 8+ messages in thread

From: Tom Lane @ 2003-10-28 15:55 UTC (permalink / raw)
  To: Lemasson Sylvain <s.lemasson@mak-system.net>; +Cc: pgsql-jdbc

"Lemasson Sylvain" <s.lemasson@mak-system.net> writes:
> Thank you for your reply thomas, but the setLoginTimout concernes the time a
> driver wait while attempting to connect to a database. My question was about
> the live time of a connection. I mean when we get a connection, postgres
> reset the connection after a time out ("connection reset by peer" error
> message).

I can assure you that the Postgres backend will never do any such thing.
Your problem must be somewhere in the communication pathway.

One likely possibility is that you have an address-translating firewall
(NAT box) between you and the database server.  NAT boxes will commonly
forget about connections that have been idle for too long.  It may not
be possible to persuade the firewall not to do this --- if you cannot
bypass the firewall, your best bet may be to issue an empty query every
so often to keep the connection alive.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* connection time out
@ 2006-05-17 15:13  Bakos Sandor <dr_saca@freemail.hu>
  0 siblings, 1 reply; 8+ messages in thread

From: Bakos Sandor @ 2006-05-17 15:13 UTC (permalink / raw)
  To: pgsql-jdbc

Hi All!

I have a linux clinet which connect to the remote posgtresql on a linux 
too with a java GUI application.
This application read an write the database when a blockout occurs. In 
this situation the java application
leave many connection in the postgresql (about 30). When the client is 
restarting and try to connect to the database I get an
exception:

Caused by: java.net.ConnectException: Connection timed out

but the max connection in the server is 200. From the console I can 
create many connection to the server (psql) just the java can't.

Someone have an idea ?

(postgresql 8, java 1.5)

Thx.
Saca



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: connection time out
@ 2006-05-18 11:02  Dave Cramer <pg@fastcrypt.com>
  parent: Bakos Sandor <dr_saca@freemail.hu>
  0 siblings, 1 reply; 8+ messages in thread

From: Dave Cramer @ 2006-05-18 11:02 UTC (permalink / raw)
  To: Bakos Sandor <dr_saca@freemail.hu>; +Cc: pgsql-jdbc

Hi,

Check your pg_hba.conf file. Java typically will connect from the  
main ethernet address where as psql connects from localhost.

Dave
On 17-May-06, at 11:13 AM, Bakos Sandor wrote:

> Hi All!
>
> I have a linux clinet which connect to the remote posgtresql on a  
> linux too with a java GUI application.
> This application read an write the database when a blockout occurs.  
> In this situation the java application
> leave many connection in the postgresql (about 30). When the client  
> is restarting and try to connect to the database I get an
> exception:
>
> Caused by: java.net.ConnectException: Connection timed out
>
> but the max connection in the server is 200. From the console I can  
> create many connection to the server (psql) just the java can't.
>
> Someone have an idea ?
>
> (postgresql 8, java 1.5)
>
> Thx.
> Saca
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match
>




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: connection time out
@ 2006-05-18 11:41  Bakos Sandor <dr_saca@freemail.hu>
  parent: Dave Cramer <pg@fastcrypt.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Bakos Sandor @ 2006-05-18 11:41 UTC (permalink / raw)
  To: Dave Cramer <pg@fastcrypt.com>; +Cc: pgsql-jdbc

Hi,

I don't understand this. When I would like connect again to the server 
(after the blackout) I can connect from the client to the server
from psql but the Java can't. In this case no connection from the 
localhost. What can I set in the pg_hba.conf ?

Saca

Dave Cramer wrote:
> Hi,
>
> Check your pg_hba.conf file. Java typically will connect from the  
> main ethernet address where as psql connects from localhost.
>
> Dave
> On 17-May-06, at 11:13 AM, Bakos Sandor wrote:
>
>> Hi All!
>>
>> I have a linux clinet which connect to the remote posgtresql on a  
>> linux too with a java GUI application.
>> This application read an write the database when a blockout occurs.  
>> In this situation the java application
>> leave many connection in the postgresql (about 30). When the client  
>> is restarting and try to connect to the database I get an
>> exception:
>>
>> Caused by: java.net.ConnectException: Connection timed out
>>
>> but the max connection in the server is 200. From the console I can  
>> create many connection to the server (psql) just the java can't.
>>
>> Someone have an idea ?
>>
>> (postgresql 8, java 1.5)
>>
>> Thx.
>> Saca
>>
>> ---------------------------(end of  
>> broadcast)---------------------------
>> TIP 9: In versions below 8.0, the planner will ignore your desire to
>>       choose an index scan if your joining column's datatypes do not
>>       match
>>
>
>
>




^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2006-05-18 11:41 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-28 08:33 Connection time out Lemasson Sylvain <s.lemasson@mak-system.net>
2003-10-28 11:23 ` Paul Thomas <paul@tmsl.demon.co.uk>
2003-10-28 14:21   ` Lemasson Sylvain <s.lemasson@mak-system.net>
2003-10-28 15:42     ` Dave Cramer <Dave@micro-automation.net>
2003-10-28 15:55     ` Tom Lane <tgl@sss.pgh.pa.us>
2006-05-17 15:13 connection time out Bakos Sandor <dr_saca@freemail.hu>
2006-05-18 11:02 ` Re: connection time out Dave Cramer <pg@fastcrypt.com>
2006-05-18 11:41   ` Re: connection time out Bakos Sandor <dr_saca@freemail.hu>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox