Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-6897

OutOfMemoryException in midPoint



    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 4.2
    • 4.3, 4.2.1
    • None
    • None
    • Active subscription
    • 4.2


      Midpoint will need more and more memory over time and this can lead to an OutOfMemoryException.

      We could isolate the problem to a few undelying problems

      • For each session midpoint will create seperate filter chains. This is not optimal because the same filter chain will be created many times. This behavior is espacially strange during cluster requests because the authentication is hardcorded for this part.
      • The Filter will not be garbage collected after the session timeout. After a session timeout the session will be removed correctly but the filters will be referenced as disposableBeans in AutowireBeanFactoryObjectPostProcessor.

      Possible root of the problem

      Our first idea is that spring is not made for the creation of many filters. So one filter should be created once and used whenever needed. Cluster requests are session based. Every internal cluster request e.g. for cache invalidation will create a session and a new filter chain. Theses sessions are not reused from the midpoint client side (ClusterExecutionHelperImpl).

      Requested solution

      The filter creation must be fixed and it should be evaluated wether sessions are a good idea for cluster requests. It can be reproduced if some kind of session (user-login, cluster login) will be created. During a heap dump or during debugging you can see the addition filters.




            sven.lukrafka Sven Lukrafka
            sven.lukrafka Sven Lukrafka
            0 Vote for this issue
            4 Start watching this issue