DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27465>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27465

memory leak in KeyedCPDSConnectionFactory

           Summary: memory leak in KeyedCPDSConnectionFactory
           Product: Commons
           Version: 1.1 Final
          Platform: Other
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Dbcp
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The WeakHashmap in KeyedCPDSConnectionFactory.java seems to be leaking a small
amount of memory.  Our 12 and 24 hour stress tests (300 concurrent users
inserting lots of data)  were running out of memory after about 8+ hours.  After
some tests we determined that it was DBCP.  This determination was made by
switching out the commons connection pooling and using an application server
(Weblogic 8.1) connection pooling.  Using the application server connection
pooling memory was not leaked.  So doing some debugging with some long running
tests in my dev environment (using OptimizeIt), I determined that the
KeyedCPDSConnectionFactory.java was leaking memory with the WeakHashMap (class
member pcMap).  I don't understand why this should leak because the jdk
documentation indicates that the keys in the map are weak referenced and when
the keys are removed, the object is removed from the map.  Nonetheless, I made
the following code change (diff is in attachment) and reran my dev tests and no
leak occurred and we reran our stress tests in the performance lab and no leak
occurred there either.  Perhaps some version of the JDK is causing this but I
suspect others may run into this as well.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to