ActiveConnections not returned to Available Connections  
erik Thu Nov 01 11:24:24 GMT 2007
 
Hi again,

I'm experiencing a extremly weird problem here. I am running primrose with servletexec and IIS. Primrose is set up with a pool of 10 connections and overflow of 2. When I run my WebApp and click through the pages fast in IE6 everything works fine until about 20-30 pages in. Then suddenly every page hangs for a second or so. I am timing execution-time on every bit of my code so I know this hangup is for about 1030ms when getting a connection from the pool. Then I checked the connectionpool activeConnection and it seems all my connections are active and the lag is because there are no available connections and one new has to be created.
So I thought somewhere in the code some connections where not closed, but I could not find such a thing. Then when I tried my WebApp in Mozilla and Opera something strange happened. In those browsers I could not replicate the problem! Everything works fine, every activeConnection is returned to Available Connections shortly after usage. But in IE6 i
 
sedj Thu Nov 01 17:55:58 GMT 2007
 
Its sounds like the pool is throttling connection requests because you have more requests than connections to handle them.
But if the problem only occurs in IE browser, then I'm not sure how the pool could be causing this.
Try upping the number of connections available to the pool and rerun your test to see if it has any effect
guest Thu Nov 01 18:04:41 GMT 2007
 
Thanks for the input.

I was however able to eliminate this bug too.

I had a servlet who basicly did this:
try{
open a connection,
do some stuff,
redirect response eg. response.sendRedirect
}catch{
handle exception
}finally{
test if connection is null, if not null connection.close()
}

So i made a little adjustment. I tried to close the connection before I do the sendRedirect, with the finally-close still there. And lo behold, everything suddenly works perfectly even in IE6!

I dont have a clue why, and that really bothers me, but it works so I cant really complain.

Maybe different browsers handles redirects differently? I dont know...