From: Paul Thomas <paul@tmsl.demon.co.uk>
To: LEON <ldai@accunettech.com>
Cc: pgsql-sql @ postgresql . org <pgsql-sql@postgresql.org>
Subject: Re: How can I to solute this problem?
Date: Tue, 29 Jul 2003 08:23:05 +0100
Message-ID: <20030729082305.A23245@bacon> (raw)
In-Reply-To: <020601c35599$392e78d0$1f00a8c0@leon>
References: <020601c35599$392e78d0$1f00a8c0@leon>
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 |
+------------------------------+---------------------------------------------+
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-sql@postgresql.org
Cc: paul@tmsl.demon.co.uk, ldai@accunettech.com
Subject: Re: How can I to solute this problem?
In-Reply-To: <20030729082305.A23245@bacon>
* 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