pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
max connection
4+ messages / 4 participants
[nested] [flat]

* max connection
@ 2003-04-30 12:13  Frédéric Liotino <Liotino@wotan.lu>
  0 siblings, 1 reply; 4+ messages in thread

From: Frédéric Liotino @ 2003-04-30 12:13 UTC (permalink / raw)
  To: pgsql-jdbc

Hello,

I have a problem when I launched simultaneous several connections, under more or less 50 connections I have a JDBC error : Backend start-up failed : FATAL : Sorry, too many clients already.

Please, How soluce this.

Thank you.

Liotino Frédéric

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: max connection
@ 2003-05-04 13:38  Nick Fankhauser <nickf@ontko.com>
  parent: Frédéric Liotino <Liotino@wotan.lu>
  0 siblings, 0 replies; 4+ messages in thread

From: Nick Fankhauser @ 2003-05-04 13:38 UTC (permalink / raw)
  To: Frédéric Liotino <Liotino@wotan.lu>; pgsql-jdbc


In postgresql.conf, add the line MAX_CONNECTIONS = n, where n is the number
of simultaneous client connections you want. The default is 32. For details
see:

http://www.postgresql.org/docs/view.php?version=7.3&file=runtime-config.html

Also, if you have that many connections, you should consider using a
connection pool if you aren't already doing so.

-Nick


-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Frédéric Liotino
Sent: Wednesday, April 30, 2003 7:14 AM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] max connection


Hello,

I have a problem when I launched simultaneous several connections, under
more or less 50 connections I have a JDBC error : Backend start-up failed :
FATAL : Sorry, too many clients already.

Please, How soluce this.

Thank you.

Liotino Frédéric




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* max connection
@ 2005-08-30 06:22  Hina Chauhan <hina.chauhan@codecindia.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Hina Chauhan @ 2005-08-30 06:22 UTC (permalink / raw)
  To: pgsql-jdbc

Dear Sir/Madam,


I am facing a problem, if u can help me.

I am uging postgres 7.4 database.  In java application I am using connection pooling (jakarta-web server, using datasource), wherein I have to decide how many max connection I should use.

Do we have any concept wherein we can say number of connection propotional to number of user  OR how many users per connection can work.

My project would be used by 100 users at a time, which may increase to 400 users latter.


I am having file context.xml with following settings, Can I add some thing more to it.

<Context reloadable="true">

<!-- Default set of monitored resources -->
 <WatchedResource>WEB-INF/web.xml</WatchedResource>
 <WatchedResource>META-INF/context.xml</WatchedResource>
 
 <!-- Uncomment this to disable session persistence across Tomcat restarts -->
 <!--
 <Manager pathname="" />
 -->
  <Resource name="jdbc/mypostgre" auth="Container"
              type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
              url="jdbc:postgresql://localhost:5432/collectioninfo"
              username="bacsindia" password="bacsindia" maxActive="5" maxIdle="2"
              maxWait="10"/> 

</Context>


Regards,

Hina Chauhan
Codec Communications pvt. Ltd.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: max connection
@ 2005-08-30 16:26  Mark Lewis <mark.lewis@mir3.com>
  parent: Hina Chauhan <hina.chauhan@codecindia.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Mark Lewis @ 2005-08-30 16:26 UTC (permalink / raw)
  To: Hina Chauhan <hina.chauhan@codecindia.com>; +Cc: pgsql-jdbc

Depends on your workload and your code.  If your code does not hog
connections for long periods of time and the queries are fairly light-
weight, then you might only need a small handful.

On the other hand, if your code ties up connections while presenting the
user interface (not a recommended mode of operation), then you would
probably need one per user.

To tune the max connections, you might want to guess low on the number
of connections, but log how long your code waits to acquire a connection
from the pool.  If it's too long, then either fix your code or increase
the connections.

-- Mark

On Tue, 2005-08-30 at 11:52 +0530, Hina Chauhan wrote:
> Dear Sir/Madam,
>  
>  
> I am facing a problem, if u can help me.
>  
> I am uging postgres 7.4 database.  In java application I am using
> connection pooling (jakarta-web server, using datasource), wherein I
> have to decide how many max connection I should use.
>  
> Do we have any concept wherein we can say number of connection
> propotional to number of user  OR how many users per connection can
> work.
>  
> My project would be used by 100 users at a time, which may increase to
> 400 users latter.
>  
>  
> I am having file context.xml with following settings, Can I add some
> thing more to it.
>  
> <Context reloadable="true">
>  
> <!-- Default set of monitored resources -->
>  <WatchedResource>WEB-INF/web.xml</WatchedResource>
>  <WatchedResource>META-INF/context.xml</WatchedResource>
>  
>  <!-- Uncomment this to disable session persistence across Tomcat
> restarts -->
>  <!--
>  <Manager pathname="" />
>  -->
>   <Resource name="jdbc/mypostgre" auth="Container"
>               type="javax.sql.DataSource"
> driverClassName="org.postgresql.Driver"
>               url="jdbc:postgresql://localhost:5432/collectioninfo"
>               username="bacsindia" password="bacsindia" maxActive="5"
> maxIdle="2"
>               maxWait="10"/> 
>  
> </Context>
>  
>  
> Regards,
>  
> Hina Chauhan
> Codec Communications pvt. Ltd.




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2005-08-30 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-30 12:13 max connection Frédéric Liotino <Liotino@wotan.lu>
2003-05-04 13:38 ` Nick Fankhauser <nickf@ontko.com>
2005-08-30 06:22 max connection Hina Chauhan <hina.chauhan@codecindia.com>
2005-08-30 16:26 ` Mark Lewis <mark.lewis@mir3.com>

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