ok, totally missed a detail: you use a XA datasource! Which version of
tomee do you use 1.7.2 or under? if under check
http://tomee.apache.org/datasource-config.html ("known issues" part)


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-10-16 14:21 GMT+02:00 iannuz <[email protected]>:

> Thanks for quick reply.
>
> In the environment where I am testing (with MaxActive=10 and MaxIdle=5) I
> monitor the number of connections opened on MySql side.
> In my test code I have 20 threads keeping:
> - getting a connection from pool
> - using it to run a SELECT
> - RELEASING it back to pool
> - sleeping for a randomic amout of time before starting from the beginning
> again
>
> After a while 20 more threads doing the same thing are started to emulate
> an
> increase in the workload.
>
> In this kind of situation I see that:
> - if I DON'T set maxIdle the number of connections used is never bigger
> than
> 11 (and sometimes some threads don't manage to get a connection due to the
> timeout) remaining limited
> - if I use maxIdle (beside maxActive) the number of connections grows
> apparently indefinitely (I have counted up to 80)
>
> To me this sounds as an issue from the pool not limiting, under that
> combination of parameters, the number of connections opened towards the db,
> which is its main purpose.
>
> What is your opinion about this?
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/org-apache-openejb-resource-jdbc-dbcp-BasicManagedDataSource-allocating-more-than-MaxActive-connectis-tp4676508p4676510.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Reply via email to