Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aP8yT-0004ck-D5 for pgsql-admin@arkaria.postgresql.org; Fri, 29 Jan 2016 13:20:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aP8yS-0004nP-WB for pgsql-admin@arkaria.postgresql.org; Fri, 29 Jan 2016 13:20:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aP8wm-0001RD-9i for pgsql-admin@postgresql.org; Fri, 29 Jan 2016 13:18:44 +0000 Received: from [83.218.36.120] (helo=mail.am-soft.de) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aP8wi-0003sw-VT for pgsql-admin@postgresql.org; Fri, 29 Jan 2016 13:18:43 +0000 Received: from localhost (dslb-188-102-138-147.188.102.pools.vodafone-ip.de [188.102.138.147]) by mail.am-soft.de (Postfix) with ESMTP id 25AB06E9 for ; Fri, 29 Jan 2016 14:18:38 +0100 (CET) Date: Fri, 29 Jan 2016 14:18:40 +0100 From: =?utf-8?Q?Thorsten_Sch=C3=B6ning?= Organization: AM-SoFT IT-Systeme X-Priority: 3 (Normal) Message-ID: <34973063.20160129141840@am-soft.de> To: pgsql-admin Subject: Re: Per thread Connection memory In-Reply-To: References: <1690525.20160127153353@am-soft.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 83.218.36.120 (deferred) X-Pg-Spam-Score: -1.1 (-) 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 Guten Tag Ankur Kaushik, am Freitag, 29. Januar 2016 um 13:16 schrieben Sie: > To Kill idle connection in every 10 sec , But after 15 -30 Min top comman= d show as below Killing idle connections is completely pointless, because those are kept open for performance reasons, pgbouncer is designed to keep connections open and idle, so that applications use them faster. If=20 you want less idle connections, reduce the configuration for those in pgbouncer, but in the end you defeat its purpose that way. > =C2=A0 PID USER =C2=A0 =C2=A0 =C2=A0PR =C2=A0NI =C2=A0VIRT =C2=A0RES =C2= =A0SHR S =C2=A0 =C2=A0 %CPU %MEM =C2=A0 =C2=A0TIME+ COMMAND > 10454 root =C2=A0 =C2=A0 =C2=A0 =C2=A020 =C2=A0 0 7101m =C2=A0 2.4g =C2= =A011m =C2=A0S =C2=A0 =C2=A0751.3 15.4 84:47.60 java You problem is obviously that you don't have any clue what your problem is, therefore you're just guessing things around. Don't do that, at least look at the logs of your Tomcat, you may even use Java Mission Control to monitor the performance of Tomcat and so on. This high load might even be the result of your script introducing some kind of a race condition, where you kill a connection just in that moment where it was given to a using process in Tomcat. If your problem is with Tomcat consuming too much memory or having unexplainable high CPU load, don't waste your time with advancing the complexity of your setup by installing pgbouncer. Focus on Tomcat and its logs first. Mit freundlichen Gr=C3=BC=C3=9Fen, Thorsten Sch=C3=B6ning --=20 Thorsten Sch=C3=B6ning E-Mail: Thorsten.Schoening@AM-SoFT.de AM-SoFT IT-Systeme http://www.AM-SoFT.de/ Telefon...........05151- 9468- 55 Fax...............05151- 9468- 88 Mobil..............0178-8 9468- 04 AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Gesch=C3=A4ftsf=C3=BChrer: Andreas Muchow --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin