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.
