Re: jdbc/postgres maximum clients?

Поиск
Список
Период
Сортировка
От Peter Mount
Тема Re: jdbc/postgres maximum clients?
Дата
Msg-id Pine.LNX.4.10.9911102106420.2398-100000@maidast.retep.org.uk
обсуждение исходный текст
Список 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@retep.org.uk     Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgresJava PDF Generator: http://www.retep.org.uk/pdf



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Michael_Hoelle@t-online.de (mich)
Дата:
Сообщение: ...
Следующее
От: Bruce Stephens
Дата:
Сообщение: Re: [INTERFACES] Re: [HACKERS] CORBA STATUS