pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ktm@rice.edu <ktm@rice.edu>
To: Gnanakumar <gnanam@zoniac.com>
Cc: Albe Laurenz <laurenz.albe@wien.gv.at>
Cc: pgsql-admin@postgresql.org
Subject: Re: Very long "<IDLE> in transaction" query
Date: Fri, 4 May 2012 08:38:42 -0500
Message-ID: <20120504133842.GH32303@aart.rice.edu> (raw)
In-Reply-To: <008001cd29db$ab24ba60$016e2f20$@com>
References: <008101cd2916$1c023b20$5406b160$@com>
	<D960CB61B694CF459DCFB4B0128514C207D4FFA7@exadv11.host.magwien.gv.at>
	<008001cd29db$ab24ba60$016e2f20$@com>

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



view thread (10+ messages)  latest in thread

Message-ID: <20120504133842.GH32303@aart.rice.edu>
Permalink:  ../20120504133842.GH32303@aart.rice.edu/
Also on:    postgresql.org/message-id/20120504133842.GH32303@aart.rice.edu

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ktm@rice.edu, gnanam@zoniac.com, laurenz.albe@wien.gv.at
  Subject: Re: Very long "<IDLE> in transaction" query
  In-Reply-To: <20120504133842.GH32303@aart.rice.edu>

* 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