Dynatrace / Dynatrace-AppMon-Oracle-Weblogic-Monitoring-Plugin

BSD 3-Clause "New" or "Revised" License
7 stars 5 forks source link

Weblogic OutOfMemory caused by getMessages operation call in JMS monitor. #1

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi,

We noticed an OutOfMemory issue after several weeks, or days sometime. It depends on the number of messages in the queues when the plugin runs. Version of Weblogic is 12.2.1.

The code resposible for this is in the JMS.java file line 172. curs = (String) connections.invoke(destRTT[x], "getMessages", new Object[]{null, new Integer(0)}, new String[]{"java.lang.String", "java.lang.Integer"});

If we have messages in the queues and we run the plugin to gather the JMSStats, the number of weblogic.messaging.kernel.internal.QueueMessageReference instances doubles. Every time the plugin is run, the amount of instances doubles. I believe is an Oracle bug and we already have ticket with them about this. This is just for your info and you can try it also.

Hopefully this is helpful. Br, Alex Damacus.

ghost commented 7 years ago

Not closing the cursor, the resources are not released. connections.invoke(destRTT[x], "closeCursor", new Object[]{curs}, new String[]{"java.lang.String"}); http://docs.oracle.com/cd/E57014_01/wls/WLAPI/weblogic/management/runtime/CursorRuntimeMBean.html#closeCursor(java.lang.String)

Dynatrace-Reinhard-Pilz commented 7 years ago

Hi Alex,

Thanks for the hint. We will update the Plugin as soon as possible.

best regards, Reinhard