Re: How to diagnose application "hangs" in pg_receive?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <linuxhippy(at)gmail(dot)com>,<pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: How to diagnose application "hangs" in pg_receive?
Date: 2011-05-21 16:24:39
Message-ID: 4DD7A0F8020000250003D9F8@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Clemens Eisserer wrote:

> A hibernate based application I wrote suffers from "hangs" - the
> thread which should fetch the data is stuck at pg_receive (the
> function reading back data from the socket).

You have two things happening which look bad, and could cause you to
experience extreme bloat. It may not be that your application is
blocked, but that your database has gotten into such bad shape that
queries are taking A Very Long Time.

First, all those autovacuum processes which have been running for
hours make me wonder if you're on a very old version of PostgreSQL
-- we had some bugs for a while which might explain those if you
haven't kept up with bug-fix minor releases:

http://www.postgresql.org/support/versioning

Please post the output from running the query on this page:

http://wiki.postgresql.org/wiki/Server_Configuration

Second, those " in transaction" connections which are hours
old will prevent autovacuum (even if you don't have an old version
with bugs) from cleaning up old versions of rows, making your
queries progressively slower. These would be caused by poor
programming technique in the application or the application
framework, and should be considered to be serious bugs.

-Kevin

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Clemens Eisserer 2011-05-21 16:42:16 Re: How to diagnose application "hangs" in pg_receive?
Previous Message Hannu Krosing 2011-05-21 15:45:19 Re: How to diagnose application "hangs" in pg_receive?