After each Cloud Discovery Schedule runs, MID Server memory accumulates until MID Server runs out of memory.
Heapdump shows JmxBeanServer is retaining references to Camel Contexts / Routes thus causing the leak.
Steps to Reproduce
- Setup Cloud Accounts
- Kick off several Discovery for the Cloud Schedules
- After each Discovery schedule discovery, take MID Server Heapdump and verify that memory usage from JmxBeanServer object is increasing.
Memory Analyser Leak Suspects report will highlight the issue once it gets bad. e.g.:
One instance of "com.sun.jmx.mbeanserver.JmxMBeanServer" loaded by "<system class loader>" occupies 1,598,801,528 (54.51%) bytes. The instance is referenced by org.apache.camel.management.DefaultManagementAgent @ 0x6861af390 , loaded by "sun.misc.Launcher$AppClassLoader @ 0x680153f78". The memory is accumulated in one instance of "java.util.HashMap$Node" loaded by "<system class loader>".
This problem is currently under review. You can contact ServiceNow Technical Support or subscribe to this Known Error article by clicking the Subscribe button at the top right of this form to be notified when more information will become available.
As a workaround, please configure the "wrapper.java.additional.501=-Dorg.apache.camel.jmx.disabled=true" property in the agent/conf/wrapper-override.conf file on MID Servers that do Cloud Discovery to help alleviate the issue.
Related Problem: PRB1322470