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

Re: Socket timeouts (probably)

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Sergei Georgiev <sergei(dot)georgiev(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Socket timeouts (probably)
Date: 2005-02-24 05:12:02
Message-ID: (view raw or whole thread)
Lists: pgsql-jdbc
Sergei Georgiev wrote:

> I have a really strange problem here. I've got two Fedora 2 machines -
> one for the database and one for a Java application to be run. When a
> transaction from the application is run against the database and the
> network cable is unplugged (or the machine is shut down) the database
> continues to hold the lock on the tables, which are used in the
> transaction. The lock is released in about 10-12 minutes, which in my
> case is not acceptable, because if another client starts a transaction
> against these locked tables his UI ties his hands until the lock on
> the tables is released and the transaction is complete.

I raised this on -hackers recently. Ideally I'd like to see a 
transaction timeout implemented on the server side for exactly this 
case. See (the 
archive indexes seem to be broken at the moment, but the direct link works).

You may want to try tweaking /proc/sys/net/ipv4/tcp_keepalive_* on the 
server to make TCP keepalives notice the dead connection faster (these 
are global settings, though). There are corresponding setsockopt() calls 
you could make on a per-socket basis if you are prepared to tweak the 
server code.


In response to


pgsql-jdbc by date

Next:From: Markus SchaberDate: 2005-02-24 09:39:14
Subject: Re: [postgis-devel] JDBC & WKB - 400% overhead
Previous:From: Kris JurkaDate: 2005-02-24 05:00:15
Subject: Re: DatabaseMetaData.getIndexInfo and function-based indexes

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