Re: jdbc/postgres maximum clients?

From: Peter Mount <peter(at)retep(dot)org(dot)uk>
To: tluyben <tycho(at)e-lab(dot)nl>
Cc: PostgreSQL Interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: jdbc/postgres maximum clients?
Date: 1999-11-10 21:10:08
Message-ID: Pine.LNX.4.10.9911102106420.2398-100000@maidast.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Tue, 9 Nov 1999, tluyben wrote:

> The following piece of code quits at the last
> connection with;
> java.sql.SQLException: Too many clients connected already.
> This seems to be around 17 connections.
> Why? What about 100 servletthreads getting a connection
> from a connectionpool. And the system quitting at connection
> 17???
> Or am I doing something wrong? I hope so, because this would
> mean that postgres is far from fit for the task I want to use it
> for...

This looks like a backend problem, rather than JDBC. I know that postgres
can limit the number of simultaneous connections, but it's not normally
that low.

I'm cc'ing the interfaces list.

Peter

> Best regards,
> Tycho Luyben
>
>
> public class Test1 {
>
> public static void main(String[] args) {
> try {
> Class.forName("postgresql.Driver");
> Vector v = new Vector();
> for (int i=0;i<18;i++) {
> Connection con =
> DriverManager.getConnection("jdbc:postgresql:coredb", "", "");
> Statement stmt = con.createStatement();
> stmt.executeUpdate("insert into _group (name) values ('GroupX');");
> stmt.close();
> v.addElement(con);
> }
> }catch(Exception e) {
> e.printStackTrace();
> }
> }
> }
>

--
Peter T Mount peter(at)retep(dot)org(dot)uk
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
Java PDF Generator: http://www.retep.org.uk/pdf

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bruce Stephens 1999-11-10 23:37:38 Re: [INTERFACES] Re: [HACKERS] CORBA STATUS
Previous Message Brendan McKenna 1999-11-10 19:31:45 Re: [INTERFACES] Re: [HACKERS] CORBA STATUS