Mantis - Resin
|Viewing Issue Advanced Details|
|ID:||Category:||Severity:||Reproducibility:||Date Submitted:||Last Update:|
|3837||minor||always||01-05-10 15:00||01-07-10 10:00|
|ETA:||none||Fixed in Version:||3.1.10|
|Summary:||0003837: DBPool does not wait for connections according to logic specified by <connection-wait-time>|
I created a
simple WAR that you can drop into any resin instance to see what I'm seeing.
I'll also include a link to my production server where you can see it
I wrote a JSP page that launches a several threads, grabs connections from
the DataSource, sleeps, then returns the connection to the pool.
I have a datasource configured in resin.conf as follows:
A url such as the following hit's this WAR on my production box
So it's creating 20 threads, with a sleep time of 2s of holding onto the
The first time you hit this page you'll notice you get exceptions that the
some of the threads were unable to retrieve connections (pool was full).
But it shouldn't be. Those threads did not wait 10s. Although they do
appear to wait roughly 2s, which means just about the time the connections
where available they are returning the pool is full.
If you reload the page you'll notice it works. That is, all 20 threads get
a connection the entire page load takes about 4s.
If you wait 15s for the pool to release idle connections, then reload the
page, the errors will reappear.
So the issue appears to be that the pool is mistakenly throwing a Pool is
full exception when the pool is growing or it's trying to grow. Once the
pool is full it seems to function as advertised.
|Steps To Reproduce:|
|Attached Files:||con-war-1.0.war [^] (11,425 bytes) 01-05-10 15:00|
|There are no notes attached to this issue.|