Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VTSug-0007Vg-FQ for pgsql-admin@arkaria.postgresql.org; Tue, 08 Oct 2013 08:45:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VTSuf-0003N8-VB for pgsql-admin@arkaria.postgresql.org; Tue, 08 Oct 2013 08:45:06 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VTSue-0003MJ-LJ for pgsql-admin@postgresql.org; Tue, 08 Oct 2013 08:45:04 +0000 Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VTSuV-0004nj-DA for pgsql-admin@postgresql.org; Tue, 08 Oct 2013 08:45:04 +0000 Received: by mail-we0-f169.google.com with SMTP id q58so3302552wes.0 for ; Tue, 08 Oct 2013 01:44:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:reply-to:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; bh=INKCyf5a7nIAHU+kC21qgKQqP+0qpmv8aqoKrAyljZM=; b=Rrc5tO4nrpT+Wi6eWEbCkQf9d3VjxjGCutdj27mKw6kF41HnIXUWpStXhcxX72PNM+ imLya6XoaAX+yZ+qPVDNImzB4o/JeMgeVWZeZU11S3vvzrzjAPGdcXCBUlZmGzCQNiWp hL4ZlkCeo3V1lrFVNNkWs93wyBnPtZSyjmIzeHt8Za3u79nFuljA5bRx/1UMI66KCyDF KXwJH9MBkKDyEZtQgekto+RVX/ubLPFAxRvqPc/6eQConS8JRUp6fdzRAzN6bvy3sKuV xz+IKoCxlQLVYU7A0cwo/VnhME9UCVB7iJo4FnlvnkD9ula7GGru/dX+NYGGVp0b5Rai OSCA== X-Received: by 10.194.240.129 with SMTP id wa1mr446174wjc.31.1381221894102; Tue, 08 Oct 2013 01:44:54 -0700 (PDT) Received: from [192.168.0.15] (89.141.101.243.dyn.user.ono.com. [89.141.101.243]) by mx.google.com with ESMTPSA id dl10sm3060674wib.1.1969.12.31.16.00.00 (version=SSLv3 cipher=RC4-SHA bits=128/128); Tue, 08 Oct 2013 01:44:53 -0700 (PDT) Message-ID: <1381221892.2793.5.camel@turing> Subject: Re: postgres connections in IDLE state.. From: jaime soler Reply-To: jaime.soler@gmail.com To: "Rajagopalan, Jayashree" Cc: "pgsql-admin@postgresql.org" Date: Tue, 08 Oct 2013 10:44:52 +0200 In-Reply-To: References: <1380809664829-5773234.post@n5.nabble.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: 0.5 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org El jue, 03-10-2013 a las 16:34 +0000, Rajagopalan, Jayashree escribió: > Thanks. > > But what is the process id that is attached to the connection? You can look at pid field in the pg_stat_activity system view. > Can I track down or debug/ get more information related to that process id? I'd use operating system tools like lsof, it provides you information related to devices, files opened... or if you want to know application information you should use java debuger like jconsole, jvisualvm. > > Regards > Jayashree > > -----Original Message----- > From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of David Johnston > Sent: 03 October 2013 19:44 > To: pgsql-admin@postgresql.org > Subject: Re: [ADMIN] postgres connections in IDLE state.. > > Rajagopalan, Jayashree wrote > > I'm seeing intermittently - the DB connections getting stale - and not > > getting returned to the Hibernate session pool. Some of the > > connections are as old as 9 days. > > The whole point of a connection pool is to keep open connections to the database. These connections, when not in use, are "IDLE". I would expect to see a single connection for every permanent pool connection. > > I don't see any problem with what you show and describe other than I'd expect more than 2 idle connections and I'd expect the supposed "problem" to be persistent. > > In your example the backend has been alive and in the pool since 9/11 and the most recent time it was used was 10/2. In between those two dates there were many other times the connection was used. > > David J. > > > > > -- > View this message in context: http://postgresql.1045698.n5.nabble.com/postgres-connections-in-IDLE-state-tp5773232p5773234.html > Sent from the PostgreSQL - admin mailing list archive at Nabble.com. > > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin > > > -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin