Re: Very long "<IDLE> in transaction" query

From: "ktm(at)rice(dot)edu" <ktm(at)rice(dot)edu>
To: Gnanakumar <gnanam(at)zoniac(dot)com>
Cc: 'Albe Laurenz' <laurenz(dot)albe(at)wien(dot)gv(dot)at>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Very long "<IDLE> in transaction" query
Date: 2012-05-04 13:38:42
Message-ID: 20120504133842.GH32303@aart.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, May 04, 2012 at 03:22:47PM +0530, Gnanakumar wrote:
> > SELECT application_name, client_addr, client_hostname, client_port
> > FROM pg_stat_activity
> > WHERE procpid = 14740;
>
> > (Replace 14740 of the process ID of the "idle in transaction" backend).
>
> > Look on the client machine and find the process that holds TCP port
> > "client_port" open (on Linux you can use "lsof" for that).
>
> Ours is a web-based application and all calls are made "only" from where the
> web server is running. No external calls are allowed in my case. Hence,
> the "only" client machine in my case is the web server.
>

You may also want to consider setting a statement_timeout to prevent this
until you can find the problem with the application.

Regards,
Ken

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Thomas Kellerer 2012-05-04 13:50:06 Re: Getting "ident" to work in Windows
Previous Message Magnus Hagander 2012-05-04 13:35:31 Re: Getting "ident" to work in Windows