X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id CE922D1C4E7 for ; Tue, 29 Jul 2003 07:23:20 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 53949-02 for ; Tue, 29 Jul 2003 04:22:23 -0300 (ADT) Received: from curry.tmsl.demon.co.uk (tmsl-adsl.demon.co.uk [80.177.114.181]) by svr1.postgresql.org (Postfix) with ESMTP id 5493CD1C4C8 for ; Tue, 29 Jul 2003 04:23:18 -0300 (ADT) Received: from bacon.tmsl.demon.co.uk (bacon.tmsl.demon.co.uk [192.168.7.102]) by curry.tmsl.demon.co.uk (8.11.6/8.11.6) with ESMTP id h6T7N7918291; Tue, 29 Jul 2003 08:23:07 +0100 Date: Tue, 29 Jul 2003 08:23:05 +0100 From: Paul Thomas To: LEON Cc: "pgsql-sql @ postgresql . org" Subject: Re: How can I to solute this problem? Message-ID: <20030729082305.A23245@bacon> References: <020601c35599$392e78d0$1f00a8c0@leon> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=gb2312 In-Reply-To: <020601c35599$392e78d0$1f00a8c0@leon>; from ldai@accunettech.com on Tue, Jul 29, 2003 at 07:18:26 +0100 X-Mailer: Balsa 1.2.3 Lines: 34 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/422 X-Sequence-Number: 14536 On 29/07/2003 07:18 LEON wrote: > I use tomcat+linux_postgresql+jsp to develop system. > > I start postgresql with 1024 processes. > FE: > postmaster -i -S -N 1024 -B 2048 -D /var/lib/pgsql/data > > My jsp doesn't implement connection pool.It directly connects postgresql > by jdbc. IME, that is not a good way to do it. Use a connection pool. > After I run the Ui some times, the UI(jsp) would report "ieSorry,too many > clientslg" .The exception is SQLException. > > I must restart tomcat or postgresql I can continue to running my UI. My guess would be that you have a bug in your application which is not always closing the connection so eventually you exceed max_connections. You should always close the connection in a finally{} block so that is guaranteed that it will be closed regardless of any earlier exceptions which are thrown. HTH -- Paul Thomas +------------------------------+---------------------------------------------+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +------------------------------+---------------------------------------------+