java - IBM MQ | 内存泄漏 | 堆转储
问题描述
websphere 版本 - 8.5.5.17
unzip -p com.ibm.mq.jar META-INF/MANIFEST.MF|grep Implementation-Version
// Not Output
unzip -p com.ibm.mqbind.jar META-INF/MANIFEST.MF|grep Implementation-Version
// Not Output
unzip -p com.ibm.mq.jmqi.jar META-INF/MANIFEST.MF|grep Implementation-Version
Implementation-Version: 7.0.1.4 - k701-104-110104
com.ibm.mq.jar - Manifest-Version: 1.0
com.ibm.mq.jmqi.jar - Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.4.2 (IBM Corporation)
com.ibm.mqbind.jar - Manifest-Version: 1.0
Java 1.8
我们正在使用 MQ 发送数据。应用程序已经运行多年,每天都会重新启动服务器。现在我们想从每天减少到每周,但我们已经开始遇到堆/内存错误。
在生成堆转储和分析时,我们发现了以下问题
Leak suspect 12,338,040 bytes (11.62 %) of Java heap is used by 106 instances of com/ibm/rmm/transmitter/QueueT
Total size 12,338,040 bytes
Size 424 bytes
Name array of com/ibm/rmm/transmitter/Submitter
Number of children 106
Number of parents 1
Owner address 0xc1b423b8
Owner object com/ibm/ws/dcs/vri/transportAdapter/rmmImpl/rmmGroup/RmmPtpGroup
Address 0xc645af70
First single ancestor com/ibm/ws/dcs/vri/transportAdapter/rmmImpl/rmmGroup/RmmPtpGroup at 0xc645af70
Leak suspect 27,580,544 bytes (27.54 %) of Java heap is used by 7 instances of java/util/HashMap$Node
Contains an instance) of the leak suspect:
- array of com/ibm/rmm/transmitter/Submitter holding 11,990,072 bytes at 0xc53e9730
Total size 27,580,544 bytes
Size 64 bytes
Name array of java/util/HashMap$Node
Number of children 7
Number of parents 1
Owner address 0xc2b6bbf0
Owner object java/util/HashMap
Address 0xc2b6bc18
First single ancestor sun/nio/ch/EPollSelectorImpl at 0xc2b6bc18
在高层次上,我可以在 finally 块中调用的代码中看到
MQQueue -> close()
MQQueueManager -> disconnect()
不确定是否需要对代码进行一些更改以清理资源,或者是否需要更新某些库版本或 websphere。
我在评论部分升级了上述客户端库,但出现以下错误。
Caused by: java.lang.NoSuchMethodError: com/ibm/mq/jmqi/JmqiMQ.isLocal()Z (loaded from file:/opt/middleware/availments/WebSphere/85-64/installedConnectors/wmq.jmsra.rar/com.ibm.mq.jmqi.jar by org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@bf93861d) called from class com.ibm.mq.ese.jmqi.ESEJMQI
我在这个问题上检查了 MQ 支持。
在 WAS 中运行时,您不能使用已安装的 MQ 客户端。您必须使用 MQ 资源适配器。根据以下链接: https ://www.ibm.com/support/knowledgecenter/en/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q031610_.htm
为了让您使用 MQ 9.1 MQ RA,您必须运行支持 JMS 2.0 的 WAS 版本。WAS 7、8 和 8.5 仅支持 JMS 1.1。因此,为了让您能够使用 MQ RA 9.1,您需要将 WAS 升级到 9.0.5。
解决方案
推荐阅读
- java - 井字游戏没有赢家
- java - 如何为drools中的子类设置不同的事件@expires
- php - WooCommerce 4.0.1 订单电子邮件格式不正确
- reactjs - Material UI 自动完成弹出器自定义在点击时关闭
- telegram - 电报如何获得他参与的所有聊天的列表?
- extjs - ExtJS6:始终在新窗口中打开的特殊请求的部分应用程序加载
- css - 在 Wordpress 中更改标题小部件的宽度
- docker - Kubernetes 中基于用户的部署
- serial-port - 无法使用 AT 命令 AT+CPMS 设置 GSM 调制解调器的存储
- java - 当并行流组合在一起java 8?