Announcement Announcement Module
No announcement yet.
WebSphere 6.0.2 + Hibernate + Spring - Memory Leak Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • WebSphere 6.0.2 + Hibernate + Spring - Memory Leak

    We are seeing some memory leak behavior with an app running on WebSphere.

    Some heap/thread dump analysis seems to suggest that threads in the WebSphere threadpool are hanging on to some resources. The app slowly consumes resources (CPU/Memory) until OutOfMemoryExceptions begin to occur.

    I've read some articles indicating that using ThreadLocal can be a little tricky, but responses by the Spring folks (as well as our analysis of the Spring code) suggests that proper cleanup is done in the OpenSessionInViewFilter. I've seen some posts suggesting that CGLIB may be the culprit, but no hard evidence.

    I've scoured the forums and other resources and haven't really come up with anything solid. Any help or insight would be greatly appreciated.

    Here's the relevant config info:

    WebSphere 6.0.2 (Running on Windows)
    Hibernate 3.2.4
    Spring 2.0.5
    cglib 2.1.3
    acegi 1.0.3
    commons-dbcp 1.2.2 (we get same behavior with C3PO)
    DB2 Database

    We are using a pretty standard configuration.

    Context config relevant sections:
    <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
            <property name="sessionFactory" ref="sessionFactory"/>
    <bean id="txProxyTemplate" abstract="true"
            <property name="transactionManager" ref="transactionManager"/>
            <property name="transactionAttributes">
                    <prop key="save*">PROPAGATION_REQUIRED</prop>
                    <prop key="delete*">PROPAGATION_REQUIRED</prop>
    				<prop key="update*">PROPAGATION_REQUIRED</prop>
                    <prop key="get*">PROPAGATION_REQUIRED</prop>


  • #2
    Tomcat yielded no leaks

    FYI - we ran tests with our app running on Tomcat 5.0.28 and 5.5.12 and it ran great. We were able to crank the load way up to the point where all pooled connections utilized nearly 100% of the time. All performance characteristics (pages/sec, roundtime, CPU, etc...) were at at least as good or better than WAS. This is not a "Tomcat is better" rant becuase I realize there is tuning that can be performed, but it was less painful - we didn't do any tuning on the default Tomcat config.


    • #3
      Did you managed to actually track down what was leaking in websphere?
      Last edited by karldmoore; Aug 29th, 2007, 11:07 AM.


      • #4
        Nope, not yet. We're working on it. I'll try to post what we find.


        • #5
          Issue resolved - WAS config issues

          We didn't change any application code - there were some config tweaks with WAS that were required to get the application to scale without running out of memory. Adjustments to the session thread pool size and timeout apparently fixed the issue.