附带报错信息,以及Javacore,0000001e ThreadMonitor W WSVR0605W: 线程“WebContainer : 66”(00000071)已保持活动状态 722140 毫秒,此线程可能已挂起。在服务器中共有 62 个线程可能处于挂起状态。有没有大神帮我看看呀?另外请问 “IBM Thread and Monitor Dump Analyzer for Java”这个工具咋用?
附件:
javacore.20161209.165031.11600.0011.txt (3.83 MB)
java -Xmx500m -jar jca457.jar
打开看了下,试试 -Xmxcl 参数
Memory Type | # of Segments | Used Memory(bytes) | Used Memory(%) | Free Memory(bytes) | Free Memory(%) | Total Memory(bytes) |
Internal | 190 | 12,328,368 | 99.01 | 123,472 | 0.99 | 12,451,840 |
Object(reserved) | 1 | 1,073,741,824 | 100 | 0 | 0 | 1,073,741,824 |
Class | 8,759 | 117,937,568 | 95.93 | 5,005,912 | 4.07 | 122,943,480 |
JIT Code Cache | 22 | 11,534,336 | 100 | 0 | 0 | 11,534,336 |
JIT Data Cache | 14 | 7,073,664 | 96.37 | 266,368 | 3.63 | 7,340,032 |
Overall | 8,986 | 1,222,615,760 | 99.56 | 5,395,752 | 0.44 | 1,228,011,512 |
NOTE: Only for Java 5.0 Service Refresh 4 (build date:February 1st, 2007) and older. When you use delegated class loaders, the JVM can create a large number of ClassLoader objects. On IBM Java 5.0 Service Refresh 4 and older, the number of class loaders that are permitted is limited to 8192 by default and an OutOfMemoryError exception is thrown when this limit is exceeded. Use the -Xmxcl parameter to increase the number of class loaders allowed to avoid this problem, for example to 25000, by setting -Xmxcl25000, until the problem is resolved.
收起
OOM导致的问题,分析HeapDump为先。
然后加大JVM最大值与最小值先,同时启用详细垃圾进行分析。
请看:
at com/wondersgroup/framework/core5/dao/impl/AbstractJdbcDaoImpl.queryForList(AbstractJdbcDaoImpl.java:246(Compiled Code)) |
是不是查询回来结果集又是整个大表了?然后OOM了。
收起代码自然是越严谨越好,但主要问题是不是这还要具体分析
要分析dump文件,一般来说是哪遇到瓶颈了
手动生成javacore
在IBM\\WebSphere\\AppServer\\bin下
1.wsadmin -lang jython -profileName AppSrv01 -user xxx -password xxxx
2.jbServer = AdminControl.queryNames(\"WebSphere:type=JVM,process=server1-1,node=WAS01Node01,*\")
-----生成dump文件
AdminControl.invoke(ojbServer, \"generateHeapDump\")
--生成Javacore
AdminControl.invoke(ojbServer, \"dumpThreads\")
Status | Number of Threads : 156 | Percentage |
Deadlock | 0 | 0 (%) |
Runnable | 5 | 3 (%) |
Waiting on condition | 147 | 94 (%) |
Waiting on monitor | 0 | 0 (%) |
Suspended | 0 | 0 (%) |
Object.wait() | 0 | 0 (%) |
Blocked | 4 | 3 (%) |
Parked | 0 | 0 (%) |
处于Waiting on condition的线程147 个