Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-1052

Memory leak in RestRequestCache

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9
    • Component/s: libraries
    • Labels:
      None

      Description

      With more monitoring and investigation using JFR, I've come to the conclusion that all the bots are leaking memory to some extent. In most cases, the leak is very slow, but in the worst cases, we are looking at OOME at least once a week.

      It looks like the culprit is the RestRequestCache. After a quick inspection of the source I can't find any code responsible for cleaning out old outdated cache entries. It seems like it's just adding (and updating) new entries, never removing anything. I think we need to either add a service thread that clears out some old data every once in a while, or amortize it every once in a while when called. It shouldn't be that expensive to check if some entries are older than a certain threshold and if so, remove them.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              erikj Erik Joelsson
              Reporter:
              erikj Erik Joelsson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: