Bugs item #1775059, was opened at 2007-08-15 23:40
Message generated for change (Settings changed) made by cjuergen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=119984&aid=1775059&group_id=19984

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Authentication
Group: 1.4.1
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Jeff S (metaquasi)
>Assigned to: Claudia Juergen (cjuergen)
Summary: Repeated execution of chooser.jsp exhausts db conn pool

Initial Comment:
The symptom:

Recently we added a second authentication method to our Dspace installation. 
Soon we noticed that we were experiencing database connection pool exhaustion 
errors nightly. It turns out that this was occurring whenever our site was 
spidered. Upon further investigation, we noticed that the problem was occurring 
after the spider tried to access multiple items that required authorization. In 
these cases, the chooser.jsp page was being returned.

The chooser.jsp page is displayed when there are more than one authentication 
methods configured for Dspace. It turns out that if the chooser.jsp gets 
executed in quick succession, by trying to access multiple items that require 
authorization for viewing, a connection pool exhaustion error occurs. The 
smaller the database connection pool setting, the more quickly you get the 
error.

Here's what I think is happening:

The chooser.jsp code creates a Context object. The Context object has a 
database connection that it requests from the pool. This connection is returned 
to the pool when the Context object is garbage collected. Unfortunately, 
garbage collection doesn't necessarily happen immediately at the end of the 
request. This means that the database connection doesn't get returned to the 
pool right away and that rapid, repeated calls that execute chooser.jsp can use 
up all the available connections.

If I explicitly return the database connection to the pool by adding the 
Context.abort() method at the end of the jsp code in chooser.jsp, there are no 
further issues with connection pool exhaustion.

It seems like it might be a good idea add this fix to the chooser.jsp if this 
is a potential problem for others.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=119984&aid=1775059&group_id=19984

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to