Hi Andrea,

Nice approach to add logging to Context.java to detect any garbage
collected connections.
Did that turn up any unclosed connections created by non-customized DSpace
code?

This made me wonder if there are any cases where db connections are created
outside of a Context and if there would be a chance those aren't closed
properly.
Both shibboleth authentication and the checksum checker seem to be calling
the Databasemanager directly without going through Context.

Shibboleth Authentication
https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/authenticate/ShibAuthentication.java#L961

Checksum Checker
https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/checker/BitstreamInfoDAO.java
https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/checker/ChecksumHistoryDAO.java
https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/checker/ChecksumResultDAO.java
https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/checker/ReporterDAO.java

best regards

Bram

-- 
[image: logo]
*Bram Luyten* *@mire*
*2888 Loker Avenue East, Suite 315, Carlsbad, CA. 92010*
*Esperantolaan 4, Heverlee 3001, Belgium*
  
<http://www.atmire.com/>www.atmire.com<http://atmire.com/website/?q=services&utm_source=emailfooter&utm_medium=email&utm_campaign=braml>


On Sun, Jan 20, 2013 at 9:56 PM, Andrea Schweer <[email protected]>wrote:

> Hi all,
>
> I'm a bit late to the party^Wthread, but just wanted to comment that my
> four repositories are all happy with a connection pool size of 50.
>
> When I ran into "pool exhausted" errors, I triple-checked all usage of
> the Context class in my custom code and found that there were a couple
> of cases where I created a new Context instance but never committed or
> aborted it. Such a Context object will hold on to its DB connection
> until the object is garbage collected and the connection is released in
> the finalize method. I also added logging output to the finalize method
> of the Context class so that I get alerted when a Context object with an
> open DB connection is garbage collected.
>
> cheers,
> Andrea
>
> --
> Dr Andrea Schweer
> IRR Technical Specialist, ITS Information Systems
> The University of Waikato, Hamilton, New Zealand
>
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_123012
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to