pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Schaber <schabios@logi-track.com>
To: Sergei Georgiev <sergei.georgiev@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Socket timeouts (probably)
Date: Wed, 23 Feb 2005 16:54:07 +0100
Message-ID: <421CA71F.405@logi-track.com> (raw)
In-Reply-To: <b9e7d4a805022307155e383636@mail.gmail.com>
References: <b9e7d4a805022307155e383636@mail.gmail.com>

Hi, Sergej,

Sergei Georgiev schrieb:
> 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 started a 'netstat -atp' on the database machine and it turned out
> that the connection with the unplugged machine is still active (5
> connections actually, because of the connection pooling). So I assumed
> that the sockets are just hanging there until they timeout and then
> the locks are released.

Maybe you can set the TCP connection keepalive probing on the server to
about 30 seconds or so via /proc/sys/net. But this is only advisable if
your server does not serve any other purposes.

Markus


-- 
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios@logi-track.com | www.logi-track.com

Attachments:

  signature.asc (application/pgp-signature, 255B) download

view thread (5+ messages)  latest in thread

Message-ID: <421CA71F.405@logi-track.com>
Permalink:  ../421CA71F.405@logi-track.com/
Also on:    postgresql.org/message-id/421CA71F.405@logi-track.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: schabios@logi-track.com, sergei.georgiev@gmail.com
  Subject: Re: Socket timeouts (probably)
  In-Reply-To: <421CA71F.405@logi-track.com>
  References: <b9e7d4a805022307155e383636@mail.gmail.com> <421CA71F.405@logi-track.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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