Reputation: 93
I am using jboss server with the following configurations timeout:-
<timeout>
<idle-timeout-minutes>1</idle-timeout-minutes>
</timeout>
<min-pool-size>10</min-pool-size>
<max-pool-size>30</max-pool-size>
<prefill>true</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
Now, as soon as the server reaches the max load(30 connections) the datasource details obtained from jboss's CLI reports Active Count = 30 and Available Count = 30.
However, even after reducing the server request to 1, the active count and the Available Count report 30 as their values.
Expected :- The numbers should decrease and ideally only 1 connection from prefilled pool should be used instead of keeping all the connections awake!!
I am seeing the following logs :-
17:34:12,359 DEBUG [org.jboss.jca.core.connectionmanager.pool.idle.IdleRemover] (IdleRemover) Notifying pools, interval: 30000
Please help!
Upvotes: 1
Views: 9067
Reputation: 4433
The connection pool implementation (ironjacamar) on WildFly 8 is in FIFO aka round robin manner. So having max-pool-size
number of request within time of idle-timeout-minutes
is enough to keep the pool from shrinking.
I have to use another decrementer policy
to tell the connection pool to shrink for a size n
explicitly for every idle-timeout-minutes
interval.
Sample setting as below
<pool>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>false</prefill>
<use-strict-min>true</use-strict-min>
<capacity>
<decrementer class-name="org.jboss.jca.core.connectionmanager.pool.capacity.SizeDecrementer">
<config-property name="Size">
1
</config-property>
</decrementer>
</capacity>
</pool>
http://www.ironjacamar.org/doc/userguide/1.1/en-US/html/ch05.html#deploying_capacity_policies
Upvotes: 1