WebSphere6.1频繁出现线程挂起问题

附带报错信息,以及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)

参与39

8同行回答

userhuuserhu软件架构设计师胡伟
java -Xmx500m -jar jca457.jar                    打开看了下,试试 -Xmxcl 参数                           &nb...显示全部

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.

Please         examine the current thread stack trace to check whether a class loader         is being loaded if there is an OutOfMemoryError.
         

  

收起
政府机关 · 2017-02-13
  • 您好,我看的不是很明白,麻烦您详细讲讲
    2017-02-13
  • 线程挂是应为你资源耗尽了,你用工具打开,你1G的堆大小都耗尽了,试着调整下JVM的参数 具体看 http://www.webspherechina.net/Question/84953
    2017-02-13
  • 八目  八目回复 userhu
    你好,可以给我粘一下javacore中1G堆大小耗尽的提示信息吗?我不会使用工具打开Javacore。
    2017-02-13
  • 八目  八目回复 userhu
    在通用 JVM 参数里加 “-Xmxcl25000“”有啥格式吗?我看到我管理控制台中原本有如下内容“-Xverify:none”
    2017-02-13
  • 不好意思,没仔细看你jdk版本 Java 5.0 Service Refresh 4 (build date:February 1st, 2007) and older,你的SDK版本比这个版要高,可能上述方法不适用,看了下,websphere还是32位的,1G的堆大小基本就到头了,建议更换64位的webshpere
    2017-02-13
  • Free Java heap size: 31.64 KB Allocated Java heap size: 1 GB
    2017-02-13
  • 八目  八目回复 userhu
    除了更换64位websphere以外,还有其他的办法吗?生产环境我恐怕无法更改。请问有没有查看javacore工具的下载和使用链接呀?我还是一头雾水
    2017-02-13
  • 建议先把WebSphere6.1的补丁都打全了 https://www-945.ibm.com/support/fixcentral/swg/selectFixes?parent=ibm%7EWebSphere&product=ibm/WebSphere/WebSphere+Application+Server&release=6.1.0.47&platform=Windows&function=all (主要是was和sdk的补丁)再看看有没问题,有条件的,生产环境使用64位的was,如果补丁打全了仍有问题,也不能跟换64位的was,只能考虑jvm调优或从代码入手了
    2017-02-13
  • ftp://public.dhe.ibm.com/software/websphere/appserv/support/tools/jca/jca457.jar 这是“IBM Thread and Monitor Dump Analyzer for Java“的下载地址 java -Xmx500m -jar jca457.jar运行就可以了
    2017-02-13
  • 八目  八目回复 userhu
    谢谢!我的javacore是在硬盘中通过搜索找到的,距离现在已经有2个多月了,可能不够实时。请问如何即时生成javacore?
    2017-02-13
  • java -Xmx500m -jar jca457.jar 启动查看javacore工具 java -jar -Xmx1000m ha456.jar 启动查看heapdump工具
    2017-02-15
  • 你的一个数据库查询的数据量太大,占用了大量的JVM内存空间,导致JVM爆了。
    2017-03-28
YuLiminYuLimin资深技术顾问IBM广州
OOM导致的问题,分析HeapDump为先。然后加大JVM最大值与最小值先,同时启用详细垃圾进行分析。请看:                                  at ...显示全部

OOM导致的问题,分析HeapDump为先。

然后加大JVM最大值与最小值先,同时启用详细垃圾进行分析。

请看:

                       
                    at           com/wondersgroup/framework/core5/dao/impl/AbstractJdbcDaoImpl.queryForList(AbstractJdbcDaoImpl.java:246(Compiled           Code))        

是不是查询回来结果集又是整个大表了?然后OOM了。

收起
互联网服务 · 2017-03-21
浏览2447
华南_胖虎华南_胖虎系统运维工程师北京中国软件股份有限公司
这个问题问的好。显示全部

这个问题问的好。

收起
系统集成 · 2017-03-16
浏览2107
userhuuserhu软件架构设计师胡伟
接着执行后面两步就可以生成了显示全部

接着执行后面两步就可以生成了

收起
政府机关 · 2017-02-17
浏览1888
userhuuserhu软件架构设计师胡伟
代码自然是越严谨越好,但主要问题是不是这还要具体分析显示全部

代码自然是越严谨越好,但主要问题是不是这还要具体分析

收起
政府机关 · 2017-02-15
浏览2006
  • 您好,根据您昨天的提示,请问我在Windows下,cmd进入IBM\WebSphereAppServer\bin,通过命令wsadmin -lang jython -profileName AppSrv01 -user wasadmin -password wasadmin是否可以即时生成javacore呀?
    2017-02-15
  • 我的user和password都是wasadmin
    2017-02-15
  • 我通过cmd输入以下生成javacore的命令: C:Documents and SettingsAdministrator>D:appIBMWebSphereAppServerbinwsa jython -profileName AppSrv01 -user wasadmin -password wasadmin 出现以下提示,不知如何解决。 C:Documents and SettingsAdministrator>D:appIBMWebSphereAppServerbinwsa jython -profileName AppSrv01 -user wasadmin -password wasadmin : 使用 SOAP 连接器连接到节点 mzjwebNode01 上的进程“server1”;进程的 anagedProcess age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibsta age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibboo age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibj2e age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerliblmp age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerliburl ar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavali ' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServeroptiona jythonjython.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerdeployt chboot.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerdeployt ch2.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerplugins .runtime.coregroupbridge_6.1.0.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerplugins .runtime.dist_6.1.0.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerplugins .runtime.gateway_6.1.0.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerplugins .runtime_6.1.0.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerplugins e.core.runtime.compatibility_3.1.100.v20060603.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerplugins e.core.runtime_3.2.0.v20060603.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr sedwsdl4j-1.6.2.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr sedjaxb-api-2.1.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr r' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr ets.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr ics.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr ity.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr cs.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr b.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr w.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr bapi.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr efw.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr ssprovider.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr seprovider2.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr aslm.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr asactivelm.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr rtpathprovider.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr r.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr ar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr mpCrmf.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr tfj-interface.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr tfj.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr skikm.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr ealthcenter.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr bmcmsprovider.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr bmjcefips.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr bmjceprovider.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr bmkeycert.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr BMKeyManagementServer.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr bmpkcs11.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr bmpkcs11impl.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr bmsaslprovider.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr bmspnego.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr ndicim.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr wsorbutil.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr access.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr avaDiagnosticsCollector.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr awBridge.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr dmpview.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavajr D.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavali age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavali rter.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavali ar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavali let.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerjavali age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibact l.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibasp age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibbas age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibbsf r' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibcom ls.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibEJB et.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibffd r' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibhtm age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibins ' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibins ' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibisc age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibivb age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibIVT age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibjac age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerliblau ar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibmai age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibmar age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibnif age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibojd age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibpc- age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibphy r' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibpmi age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibrrd ' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibrsa ' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibrsa ' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibser .jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibset age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibslj age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibspy age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibspy age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibsql age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibtcl age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibuti age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibwsa age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerlibwsi ar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerdeployt ginscom.ibm.etools.ejbdeployruntimebatch.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerdeployt ginscom.ibm.etools.ejbdeployruntimeejbdeploy.jar' age-mgr*: processing new jar, 'D:appIBMWebSphereAppServerdeployt ginscom.ibm.etools.ejbdeployruntimeejbmapvalidate.jar' : 要获取帮助,请输入:“print Help.help()”
    2017-02-15
userhuuserhu软件架构设计师胡伟
是的分析dump文件,看看具体有瓶颈的代码,如果平时没有内存溢出的现象,只是两个月前发生过一次,我怀疑可能是数据库或网络有瓶颈显示全部

是的分析dump文件,看看具体有瓶颈的代码,如果平时没有内存溢出的现象,只是两个月前发生过一次,我怀疑可能是数据库或网络有瓶颈

收起
政府机关 · 2017-02-14
浏览1855
  • 这个javacore是两个月以前的了,线程挂起大约2-3天出现一次,频率很高。
    2017-02-14
  • 我排查代码,发现PrintWriter.flush(),但并未close(),请问是否有可能是我线程挂起的部分原因?
    2017-02-14
userhuuserhu软件架构设计师胡伟
要分析dump文件,一般来说是哪遇到瓶颈了手动生成javacore在IBM\\WebSphere\\AppServer\\bin下1.wsadmin -lang jython -profileName AppSrv01 -user xxx -password xxxx2.jbServer = AdminControl.queryNames(\"WebSphere:type=JVM,process=server1-1,node=WAS01Node01,*\...显示全部

要分析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\")

收起
政府机关 · 2017-02-13
浏览1929
  • 您是说,我需要分析dump文件,而不是javacore文件吗?
    2017-02-14
userhuuserhu软件架构设计师胡伟
                                                      Status  &nb...显示全部

   

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
              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

收起
政府机关 · 2017-02-13
浏览2188
  • 我已通过软件打开,谢谢!
    2017-02-13
  • 处于等待资源(Waiting on condition)状态的线程太多了,我这边通过工具已经看到。请问有解决的办法吗?是否是代码原因?
    2017-02-13

提问者

八目
软件开发工程师万达信息股份有限公司

问题状态

  • 发布时间:2017-02-13
  • 关注会员:6 人
  • 问题浏览:7933
  • 最近回答:2017-03-21
  • X社区推广