调试tomcat崩溃 [英] debugging tomcat crash

查看:126
本文介绍了调试tomcat崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Tomcat实例,该实例由于未知原因而定期崩溃。

I have an instance of Tomcat which periodically crashes for unknown reasons.

日志中没有留下错误,事件查看器中只有一行显示 Tomcat已终止意外。

There are no errors left in the logs, only a line in Event Viewer saying "Tomcat terminated unexpectedly".

在测试环境中,我无法复制该问题。因此,我主要只限于对生产环境进行被动监视。

In a test environment I have been unable to replicate the issue. I am therefore mostly restricted to passive monitoring of the production environment.

该问题似乎与内存无关,因为意外的终止与流程没有明显的关联。内存使用情况。

The problem does not seem to be related to memory as the unexpected terminations show no obvious correlation to the process' memory usage.

我可以采取哪些措施进一步诊断此问题?

What steps could I take to further diagnose this problem?

编辑:

一些更正/澄清:

实际上,它不是Tomcat的一个实例,而是几个具有类似配置的实例。

It is actually not a single "instance" of Tomcat, rather several instances with similar configurations.

操作系统是Windows 2003。

OS is Windows 2003.

Java版本是Java 6。

Java version is Java 6.

更新:

看起来这个问题毕竟可能与内存有关。发现了一些在Tomcat目录中创建的故障转储(不是... / Tomcat / logs)。

Looks like the issue might be related to memory after all. Discovered some crash dumps which were created in the Tomcat directory (not .../Tomcat/logs).

这些转储主要包含以下错误:

The dumps mostly contained errors such as:

java.lang.OutOfMemoryError:为ChunkPool :: allocate请求了32756个字节。交换空间不足?

java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate. Out of swap space?

这是意外的,因为当内存使用率相对较低时(与历史使用率相比),该过程有时会崩溃。

This is unexpected as the process sometimes crashed when it's memory usage was a relatively low point (compared to historical usage).

在所有转储中,彼尔姆gen空间的使用率为99%,但从绝对意义上讲,这种用法并不一致,并且没有达到-XX:MaxPermSize中指定的限制。 b $ b

In all dumps, perm gen space is at 99% usage, but in absolute terms this usage is not consistent, and is nowhere near the limit specified in -XX:MaxPermSize.

推荐答案

这向我表明整个JVM崩溃了,这是很不寻常的事情。我会考虑以下步骤:

This indicates to me that the whole JVM crashed, which is a rather unusual thing. I would consider the following steps:


  • 首先检查硬件是否正常。运行memtest86 +- http://www.memtest86.com/ 或在Ubuntu cd上运行-测试内存。让它运行一段时间来绝对确定。

  • 然后看看您使用的Java版本是否可以。 Java 6的某些版本破坏了一些微妙的功能。此时,最新的Java 5可能是一个不错的解决方案。

  • 禁用Tomcat本机代码以提高性能。 Tomcat有一个用于某物的本地库。由于您的JVM崩溃了,因此摆脱原生代码是一个很好的开始。

  • 查看所用Windows版本是否有一些限制。终止前的cpu使用限制或任何其他配额。

  • First check the hardware is ok. Run memtest86+ - http://www.memtest86.com/ or on a Ubuntu cd - to test the memory. Let it run a while to be absolutely certain.
  • Then see if the version of Java you use, is ok. Some versions of Java 6 broke some subtle functionality. The latest Java 5 might be a good solution at this point.
  • Disable the Tomcat native code to improve performance. There is a native library which Tomcat uses for something. Since you have a crashing JVM, getting rid of native code is a very good start.
  • See if there is some restrictions in the version of Windows you use. A cpu usage limit before termination, or any other quota.

这篇关于调试tomcat崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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