By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,695 Members | 1,956 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,695 IT Pros & Developers. It's quick & easy.

Tomcat Connection Pool?

P: n/a
I am running a connection pool for the PostgreSQL and I was wondering
which values you would reccommend for the connection pool?

<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>

What does maxWait and maxIdle means?
Regards,

BTJ
--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen (BSc,MNIF)
Executive Manager
bt*@havleik.no Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91 N-1338 Sandvika
Cellular : +47 926 93 298 http://www.havleik.no
-----------------------------------------------------------------------------------------------
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
-----------------------------------------------------------------------------------------------

Nov 11 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

On 02/09/2003 23:06 Bjørn T Johansen wrote:
I am running a connection pool for the PostgreSQL and I was wondering
which values you would reccommend for the connection pool?

<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>

What does maxWait and maxIdle means?


maxWait is is maximum time the connection pool will wait for a connection
to become available so it only has an effect when all maxActive
connections are being used at the same time. maxIdle is the maximum number
of connections what the pool will keep open. Using your settings as an
example, say you reach a point where all 10 connections have beed created
and are in use and that sometime later the nunber of requests drops so
that they can serviced by just a few connections. In this case excess idle
connections will be closed but there will always be at least maxIdle
connections left open.
HTH

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 11 '05 #2

P: n/a
Oki, thx... Any ideas to what is sensible values also?
(Like number of maxIdle compared to maxActive, etc..)
BTJ

On Wed, 2003-09-03 at 15:34, Paul Thomas wrote:
On 02/09/2003 23:06 Bjørn T Johansen wrote:
I am running a connection pool for the PostgreSQL and I was wondering
which values you would reccommend for the connection pool?

<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>

What does maxWait and maxIdle means?


maxWait is is maximum time the connection pool will wait for a connection
to become available so it only has an effect when all maxActive
connections are being used at the same time. maxIdle is the maximum number
of connections what the pool will keep open. Using your settings as an
example, say you reach a point where all 10 connections have beed created
and are in use and that sometime later the nunber of requests drops so
that they can serviced by just a few connections. In this case excess idle
connections will be closed but there will always be at least maxIdle
connections left open.
HTH

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 11 '05 #3

P: n/a

On 03/09/2003 22:56 Bjørn T Johansen wrote:
Oki, thx... Any ideas to what is sensible values also?
(Like number of maxIdle compared to maxActive, etc..)


I think sensible values are going to be very dependent on the number of
requests. One way to find out might be to write a little utility to count
the number of back-end postgres connections and have it run every 3 or 4
seconds. That would give you an idea of the maximum and average number of
connections being used.

HTH

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 11 '05 #4

P: n/a
>
On 03/09/2003 22:56 Bjørn T Johansen wrote:
Oki, thx... Any ideas to what is sensible values also?
(Like number of maxIdle compared to maxActive, etc..)


I think sensible values are going to be very dependent on the number of
requests. One way to find out might be to write a little utility to count
the number of back-end postgres connections and have it run every 3 or 4
seconds. That would give you an idea of the maximum and average number of
connections being used.

HTH

--
Paul Thomas


Well, that's one way to go. Guess I just have to try and fail... :)
Thx....

BTJ

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.