Tomcat Connection Pool?
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
btj@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."
-----------------------------------------------------------------------------------------------
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 |
+------------------------------+---------------------------------------------+
Oki, thx... Any ideas to what is sensible values also?
(Like number of maxIdle compared to maxActive, etc..)
BTJ
Show quoted text
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
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 |
+------------------------------+---------------------------------------------+
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