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

Re: connection delay

From: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: cristi <cristi(at)dmhi(dot)ct(dot)ro>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: connection delay
Date: 2004-07-22 08:07:44
Message-ID: Pine.LNX.4.44.0407221052340.12415-100000@matrix.gatewaynet.com (view raw or flat)
Thread:
Lists: pgsql-sql
O kyrios cristi egrapse stis Jul 22, 2004 :

> I have a client made in java who interogate postgres using jdbc driver.
> If the tcp conection falls (for a few seconds) the client give an error
> message about that connection.
> How can I avoid this error?

If its not a jdbc issue, maybe you can play with

/* for a new connection */				
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
/* for already established connection */
System.setProperty("sun.net.client.defaultReadTimeout", "10000");

the interval is given in milliseconds.

I have tested on FreeBSD 5.1-RELEASE-p10,  
1.4.2-p5 JVM

> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

-- 
-Achilleus


In response to

pgsql-sql by date

Next:From: cristiDate: 2004-07-22 08:12:34
Subject: connection delay
Previous:From: Chris CoxDate: 2004-07-22 07:38:28
Subject: LIKE on index not working

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group