Tomcat 6 在启动时冻结
当我启动 tomcat 6 时,它会在启动的某个时刻冻结并永远停留在那里(我等了 3 个小时,什么也没发生 - 甚至没有内存不足错误)。 我不知道什么会导致这样的行为。
我正在使用 Jira 和 Confluence 运行 tomcat,问题似乎是当 tomcat 尝试加载 confluence 时:
******************************************************************************************************
JIRA 3.13.3 build: 344 (Enterprise Edition) started. You can now access JIRA through your web browser.
******************************************************************************************************
2009-06-02 19:38:21,272 JiraQuartzScheduler_Worker-1 INFO [jira.action.admin.DataExport] Export took 387ms
2009-06-02 19:38:21,291 JiraQuartzScheduler_Worker-1 INFO [jira.action.admin.DataExport] Wrote 392 entities to export
2009-06-02 19:38:21,606 INFO [main] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 2.10.3 (build #1519)
2009-06-02 19:38:21,711 INFO [main] [beans.factory.xml.XmlBeanDefinitionReader] loadBeanDefinitions Loading XML bean definitions from class path resource [bootstrapContext.xml]
2009-06-02 19:38:22,236 INFO [main] [beans.factory.xml.XmlBeanDefinitionReader] loadBeanDefinitions Loading XML bean definitions from class path resource [setupContext.xml]
在上面的这一行之后,没有再发生任何事情。
我认为这可能是 permGem 或类似问题,因此为了避免 permGem 限制,我将 catalina.sh 配置为:
CATALINA_OPTS="$CATALINA_OPTS -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true"
JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:PermSize=256m -XX:MaxPermSize=640m -XX:+DisableExplicitGC"
我增加了很多 jvm 空间以查看它是否有效,但没有帮助。
汤姆猫版本:6.0.18 吉拉版本:3.13.3 Confluence 版本:2.10.3
那么,有人以前遇到过这个问题吗? 可能是内存(RAM)问题吗? Spring 和 Tomcat6 有问题吗? 或者有其他类型的问题吗?
When I start tomcat 6 it freezes in certain point of the startup and stays there forever (I've waited 3 hours and nothing happened - not even an out of memory error). I don't have any clue of what could cause a behavior like that.
I'm runnig tomcat with Jira and Confluence, and the problem seem to be when tomcat tries to load confluence:
******************************************************************************************************
JIRA 3.13.3 build: 344 (Enterprise Edition) started. You can now access JIRA through your web browser.
******************************************************************************************************
2009-06-02 19:38:21,272 JiraQuartzScheduler_Worker-1 INFO [jira.action.admin.DataExport] Export took 387ms
2009-06-02 19:38:21,291 JiraQuartzScheduler_Worker-1 INFO [jira.action.admin.DataExport] Wrote 392 entities to export
2009-06-02 19:38:21,606 INFO [main] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 2.10.3 (build #1519)
2009-06-02 19:38:21,711 INFO [main] [beans.factory.xml.XmlBeanDefinitionReader] loadBeanDefinitions Loading XML bean definitions from class path resource [bootstrapContext.xml]
2009-06-02 19:38:22,236 INFO [main] [beans.factory.xml.XmlBeanDefinitionReader] loadBeanDefinitions Loading XML bean definitions from class path resource [setupContext.xml]
After this line above nothing more happens.
I thought it could be a problem with permGem or something like that, so to avoid permGem limitations, I configured catalina.sh with:
CATALINA_OPTS="$CATALINA_OPTS -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true"
JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:PermSize=256m -XX:MaxPermSize=640m -XX:+DisableExplicitGC"
I incresed a lot jvm's space to see if it works, but it didn't help.
Tomcat version: 6.0.18
Jira version: 3.13.3
Confluence Version: 2.10.3
So, anyone have already had this problem before?
Could it be a memory(RAM) problem?
A problem with Spring and Tomcat6?
Or any other kind of problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
请检查 $CATALINA_BASE/common/lib/javaee.jar 是否存在
please check whether $CATALINA_BASE/common/lib/javaee.jar exists
我检查了我的数据库,它根本不起作用,但这并不是导致我的 tomcat 冻结的问题。
我遇到了内存不足的问题。 在 Tomcat 被卡住的地方,存在一个内存峰值,需要从 Confluence 加载大量内容。
我正在使用虚拟机(VMware)在服务器内运行我的 confluence、jira 和 svn,以及另外 3 个虚拟机。
为了解决这个问题,我必须将虚拟机可以使用的内存 (RAM) 从 2Gb 增加到 4Gb。
I checked my database, it was not working at all, but that was not the problem that was making my tomcat freeze.
I had a lack of RAM issue. In that place where tomcat got stuck there was a memory peak to load a lot of stuff from confluence.
I am using a virtual machine(VMware) to run my confluence, jira and svn inside a server with 3 other virtual machines.
To solve the problem I had to increase the memory(RAM) my virtual machine could use, from 2Gb to 4Gb.
您的日志中有任何错误吗?
您是否检查过 Confluence 是否正在等待数据库或网络?
Do you have any errors in your log?
Have you checked if confluence is maybe waiting for the database or network?
获取应用程序的线程转储,并检查是否有被阻止的线程, WAITING 或 TIMED_WAITING。
还要注意 RUNNABLE 中的线程但是正在执行网络 I/O,例如
InputStream.read()
。Get a thread dump for the application and check for threads which are BLOCKED, WAITING or TIMED_WAITING.
Also beware of threads in RUNNABLE but doing network I/O, e.g
InputStream.read()
.