websphere启动时报java.lang.OutOfMemory:java heap space
环境:websphere8.5.5.5 + DB2
程序语言:java,开发环境:tomcat
问题:启动时在加载JDBC(数据库连接配置文件)之后,启动流程卡死,报内存溢出的错;
经过多次尝试,(可能有清理缓存,增加jvm内存,加大线程池和连接池的最大值等操作),
也有可以启动的情况,但是卸载应用,再次安装,启动又会内存溢出。
求解:1、引起内存溢出的概率原因;
2、卸载应用时,同时应该清理的物理文件内容;
3、JVM虚拟机堆栈大小设置值(计算机内存16G);
4、如果有程序内存泄露,如何捕捉定位代码。
部分SystemOut.log内容:
[1/8/16 19:36:39:624 PST] 00000061 SystemOut O 2016-01-08 19:36:39,623 [INFO ] [PropertiesLoaderSupport.java] loadProperties : 172 -- Loading properties file from class path resource [jdbc.properties]
[1/8/16 19:36:39:652 PST] 00000061 SystemOut O 2016-01-08 19:36:39,651 [INFO ] [AutowiredAnnotationBeanPostProcessor.java] <init> : 153 -- JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
[1/8/16 19:36:45:808 PST] 00000037 MbuRmmAdapter I DCSV1032I: DCS Stack DefaultCoreGroup at Member localhostCell01localhostNode01server1: Connected a defined member localhostCell01localhostCellManager01dmgr.
[1/8/16 19:36:49:869 PST] 00000036 RoleViewLeade I DCSV8054I: DCS Stack DefaultCoreGroup at Member localhostCell01localhostNode01server1: View change in process.
[1/8/16 19:36:49:881 PST] 00000037 VSyncAlgo1 I DCSV2004I: DCS Stack DefaultCoreGroup at Member localhostCell01localhostNode01server1: View synchronization completed successfully. The View Identifier is (1:0.localhostCell01localhostNode01server1). The internal details are None.
[1/8/16 19:36:49:976 PST] 00000036 MBRStateXchg I DCSV8070I: DCS Stack DefaultCoreGroup at Member localhostCell01localhostNode01server1: Updated HA Manager state. New state version is CoreGroupConfig : MemberName dmgr, DMGR true, time read 1452310231766, number coordinators 1, numberPreferred 0, numberProcesses 3, version 16eb1b74d6eb43f77b0a3b05316a1e1c4b60d5c6
[1/8/16 19:36:49:998 PST] 00000036 CoordinatorCo I HMGR0086I: This server is updating its core group configuration. The new document version is CoreGroupConfig : MemberName dmgr, DMGR true, time read 1452310231766, number coordinators 1, numberPreferred 0, numberProcesses 3, version 16eb1b74d6eb43f77b0a3b05316a1e1c4b60d5c6.
[1/8/16 19:36:50:008 PST] 00000036 CoordinatorIm I HMGR0228I: The Coordinator is not an Active Coordinator for core group DefaultCoreGroup. The active coordinator set is [localhostCell01localhostCellManager01dmgr].
[1/8/16 19:36:50:009 PST] 00000042 ViewReceiver I DCSV1033I: DCS Stack DefaultCoreGroup at Member localhostCell01localhostNode01server1: Confirmed all new view members in view identifier (3:0.localhostCell01localhostCellManager01dmgr). View channel type is View|Ptp.
[1/8/16 19:36:50:070 PST] 00000036 CoordinatorIm I HMGR0218I: A new core group view has been installed. The core group is DefaultCoreGroup. The view identifier is (3:0.localhostCell01localhostCellManager01dmgr). The number of members in the new view is 3.
[1/8/16 19:36:50:079 PST] 00000036 CoreGroupMemb I DCSV8050I: DCS Stack DefaultCoreGroup at Member localhostCell01localhostNode01server1: New view installed, identifier (3:0.localhostCell01localhostCellManager01dmgr), view size is 3 (AV=3, CD=3, CN=3, DF=3)
[1/8/16 19:36:58:264 PST] 0000004a Peer I ODCF8516I: The unstructured overlay is operational, without security: 127.0.0.1 udp_port=11003 tcp_port=11004.
[1/8/16 19:40:43:728 PST] 00000045 ApplicationMo W DCSV0004W: DCS Stack DefaultCoreGroup at Member localhostCell01localhostNode01server1: Did not receive adequate CPU time slice. Last known CPU usage time at 19:39:27:761 PST. Inactivity duration was 43 seconds.
[1/8/16 19:40:41:298 PST] 0000003f LogAdapter E DCSV9416E: An internal error occurred. Exception is com.ibm.ws.dcs.common.exception.DCSTransportLayerException: HeartbeatProcessor
at com.ibm.ws.dcs.vri.transportAdapter.rmmImpl.common.LogAdapter.handle9416(LogAdapter.java:257)
at com.ibm.ws.dcs.vri.transportAdapter.rmmImpl.common.LogAdapter.handleNls(LogAdapter.java:170)
at com.ibm.ws.dcs.vri.transportAdapter.rmmImpl.common.LogAdapter.onLogEvent(LogAdapter.java:131)
at com.ibm.rmm.util.RmmLogger.baseLog(RmmLogger.java:245)
at com.ibm.rmm.ptl.tchan.receiver.HeartbeatProcessor.run(HeartbeatProcessor.java:449)
Caused by: java.lang.OutOfMemoryError: Java heap space
at com.ibm.rmm.ptl.tchan.receiver.HeartbeatProcessor.run(HeartbeatProcessor.java:371)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
设置下jvm的最大最小参数
有没有方法定位程序代码,比如类,或者方法?
回复
有。用jmeter做压力测试,然后websphere启动的时候设置JVM参数 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/usr/aaa/dump ,这样在发生OOM的时候会把内存快照DUMP到指定位置。然后利用MAT工具(百度MAT内存分析)进行快照分析。
回复
WAS如果有内存溢出的情况,自动生成的有javacore和heapdump的文件。之前有用IBM的分析工具,jca 和 ha,但是结果比较模糊,MAT也是分析到程序代码吗?
一般这种情况最好不要单纯去调大JVM参数。先找到原因。
每次都有重启的
websphere每次重装应用需要重启。
./stopServer server1 -username user -password password
./startServer server1