几个小时后tomcat 6挂起 [英] tomcat 6 hangs after a few hours

查看:35
本文介绍了几个小时后tomcat 6挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在 tomcat 上有一个应用程序,在 Windows server 2007 web 上使用 SQL 服务器(禁用 IIS),它可以顺利运行几个小时,但随后突然停止响应请求.日志信息量不大.我们在某个 JSP 上看到了 NullPointer 异常,但系统仅在 30 小时后挂起.我们在 Tomcat lo4j 日志上看到了男子气概的异常……但似乎没有任何相关性.应用程序本身部分是黑匣子

We have an application on tomcat using SQL server on top on Windows server 2007 web (IIS disabled) it works smoothly for a few hours but then it suddenly stops answering requests. Log aren't too informative. We've seen an NullPointer exception on a certain JSP, but the syetem only hanged 30 hours after that. We see manly exceptions on Tomcat lo4j log...but nothing appears related. THe application itself it partly black box

推荐答案

除了特定于应用程序的内容(应用程序在等待哪些资源?它是否持有对它们的引用?)并提高日志记录级别,请尝试:

Aside from application specific stuff (what resources is the application waiting on? is it holding references to them?) and turning up the logging level, try:

运行带有标志的 tomcat 以输出 GC 活动:

run tomcat with flags to output GC activity:

java -verbose:gc

这里是关于 gc 调优的很好参考,但是要检查挂起,您可能只想查看它是否遇到内存错误.

Here's a good reference on gc tuning, but to check for a hang you probably just want to see if it runs into a memory error.

您还可以使用 jstack 来检查线程的状态,看看有什么挂起:

You can also use jstack to check the status of your threads, see what's hanging:

jstack PID

这篇关于几个小时后tomcat 6挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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