Re: "Hanging Connection" blocks access to table (JBossMQ)

From: Michael Goldner <mgoldner(at)agmednet(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dave Cramer <pg(at)fastcrypt(dot)com>, Michael Goldner <mike(dot)goldner(at)comcast(dot)net>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: "Hanging Connection" blocks access to table (JBossMQ)
Date: 2006-10-11 19:09:16
Message-ID: C152B99C.1D17%mgoldner@agmednet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I should have worded my response more carefully ;)

With both Jboss and Postgresql running, a "ps -ef |grep postgres" shows two
processes in an "INSERT waiting" state, one in an idle state and the
autovacuum process.

Jboss is the only application that uses the database, so I'm sure that the
processes are not for something else.

When I shutdown Jboss, the idle process disappears, but the 2 "INSERT
waiting" processes remain indefinitely. Once I restart Postgres, everything
immediately clears and it starts again in a normal state with no blocking.

I'm going to see if I can put together a test environment to reproduce the
problem, but simulating load conditions is always tricky. If I can produce
it, I'll be able to gather more information (strace, gdb, etc.).

Thanks,

Mike

On 10/11/06 2:57 PM, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Michael Goldner <mgoldner(at)agmednet(dot)com> writes:
>> I shut down postgresql manually (pg_ctl restart -m immediiate) after I had
>> first stopped Jboss and waited about 30 seconds to see that the two blocking
>> connections were not closing.
>
> Really? "-m immediate" should boot backends off lock waits in any case
> ... and does according to my tests. Whether Jboss notices the
> connections dropping right away might be another story. What are you
> observing as a "not closed" connection?
>
> I wouldn't personally use "-m immediate" for this purpose mind you.
> "-m fast" is safer and should have the same result.
>
> regards, tom lane

--
Mike Goldner
Vice President Networks and Technology
AG Mednet, Inc.
The Pilot House
Lewis Wharf
Boston, MA 02110
617.854.3225 (office)
617.909.3009 (mobile)

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2006-10-11 19:15:22 Re: "Hanging Connection" blocks access to table (JBossMQ)
Previous Message Tom Lane 2006-10-11 18:57:07 Re: "Hanging Connection" blocks access to table (JBossMQ)