connection delay

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?


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
cristi [ Do, 22 Juli 2004 10:12 ] [ ID #453059 ]

Re: connection delay

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


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
achill [ Do, 22 Juli 2004 10:07 ] [ ID #453060 ]
Datenbanken » comp.databases.postgresql.sql » connection delay

Vorheriges Thema: next integer in serial key
Nächstes Thema: Please help me.. problem in to_char