Re: How can I to solute this problem?

From: Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk>
To: LEON <ldai(at)accunettech(dot)com>
Cc: "pgsql-sql (at) postgresql (dot) org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: How can I to solute this problem?
Date: 2003-07-29 07:23:05
Message-ID: 20030729082305.A23245@bacon
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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 |
+------------------------------+---------------------------------------------+

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Subramaniam, Sankari (Cognizant) 2003-07-29 11:07:03 unsubscribe pgsql-sql@postgreSQL.org
Previous Message LEON 2003-07-29 06:18:26 How can I to solute this problem?