Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-5076

Field reference to script engine appears to cause memory bloat

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.8.16, 1.9.93
    • Fix Version/s: 1.8.17, 1.10.0
    • Component/s: Thresholding
    • Security Level: Default (Default Security Scheme)
    • Labels:

      Description

      Some OpenNMS users are seeing unexpectedly large amounts of memory usage that is causing high CPU utilization due to garbage collection. When investigating this issue by analyzing heapdumps from the systems, I discovered that there is a large amount of RAM being retained by the list of CollectableService objects. After drilling down into these objects, it appears that a lot of the RAM is being used by an instance of the scripting engine that is used to evaluate threshold expressions.

      In 1.8, we used the JEP library for this purpose and in the 1.10 branch, the engine was changed to JEXL. In both cases, the ExpressionConfigWrapper class retains a reference to the script engine. I'm going to change the code so that instead of holding this reference as a class field, we just call the constructor as needed to create a new script engine.

        Attachments

          Activity

            People

            • Assignee:
              seth Seth Leger
              Reporter:
              seth Seth Leger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: