无法使用jvisualvm配置JBoss 5 [英] Unable to profile JBoss 5 using jvisualvm

查看:252
本文介绍了无法使用jvisualvm配置JBoss 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经得到了一些到我的VM args:





那么,




  • 关于如何让分析工作的任何想法?

  • 是否值得玩 G1GC 而不是......我目前使用的是什么GC?


解决方案

在我看来,您在32位JVM上运行VisualVM,而您的JBoss在64位JVM上运行。在这种情况下,分析器和其他东西(如线程和CPU监视)在开箱即用的Windows上不起作用。使用分析器,您将遇到错误的#273 ,其中未正确启用分析器。您应该执行以下操作:


  1. 下载最新的64位JDK(目前为JDK 6u23)。它还包含最新版本的Java VisualVM

  2. 在VisualVM中使用内存采样器(它的开销比分析要低得多),看看是否可以发现问题。

  3. 如果这没有帮助,请查看堆转储并尝试找出正在发生的事情。

  4. 对JBoss服务器进行内存分析。请参阅使用VisualVM进行概要分析,第1部分使用VisualVM进行概要分析,第2部分,了解有关VisualVM中的分析器的更多信息。


I've been getting some java.lang.OutOfMemoryError: GC overhead limit exceeded errors while running my Java app overnight:

java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid6376.hprof ...
Heap dump file created [512149941 bytes in 23.586 secs]
23:34:52,163 WARN  [HDScanner] Scan failed
java.lang.OutOfMemoryError: Java heap space
23:34:52,298 ERROR [ContainerBase] Exception invoking periodic operation: 
java.lang.OutOfMemoryError: Java heap space
23:34:52,321 ERROR [JIoEndpoint] Socket accept failed
java.lang.OutOfMemoryError: Java heap space
    at java.net.ServerSocket.accept(Unknown Source)
    at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
    at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)

If I open up jvisualvm, I can see that I am indeed out of heap space:

I'd like to profile it to try to figure out what's going on - is there a memory leak? etc. However, I'm unable to get the jvisualvm profiler to do anything at all. The Profiler tab shows a warning about class sharing being enabled:

...even though I've added the -Xshare:off flag to my VM args:

So,

  • Any ideas about how to get profiling to work?
  • Is it worth playing around with G1GC instead of ...whatever GC I'm currently using?

解决方案

It looks to me that you are running VisualVM on 32-bit JVM and your JBoss is running on 64-bit JVM. In such situation profiler and other things like Threads and CPU monitoring does not work on Windows out of the box. With profiler you are running into bug #273, where profiler is incorrectly enabled. You should do the following:

  1. Dowload latest 64-bit JDK (currently JDK 6u23). It also contains the latest version of Java VisualVM
  2. Use memory sampler in VisualVM (it has much lower overhead than profiling) to see if you can spot the problem.
  3. If that does not help, take a look at the heap dump and try to find out what is going on.
  4. Do memory profiling of your JBoss server. See Profiling With VisualVM, Part 1 and Profiling With VisualVM, Part 2 for more information about profiler in VisualVM.

这篇关于无法使用jvisualvm配置JBoss 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆