TeamCity.war 挂在 Tomcat 中
我一直在尝试在 Mac OS X Server 10.6 上将 TeamCity 6.5 设置为 Tomcat 下的 WAR(尝试过 6 和 7)。一切开始都很好,但随机点击几秒钟总是会挂起整个应用程序和容器。我什至无法打开 Tomcat 的网络应用程序管理器或服务器状态页面。
我无法辨别挂起发生的时间或地点的任何模式,尽管我点击得越快,挂起似乎更容易发生。
运行 top
显示服务器正在以 100% CPU(一个核心)运行。
为什么 TeamCity 在作为 WAR 运行时很容易挂起?单机版似乎没有遇到同样的问题。
I have been trying to set up TeamCity 6.5 as a WAR under Tomcat (tried 6 and 7) on Mac OS X Server 10.6. Everything starts fine, but a few seconds of randomly clicking around invariably hangs the entire app and container. I can't even bring up Tomcat's web-app manager or server status pages.
I cannot discern any pattern to when or where the hang occurs, though it does seem to happen more readily the faster I click.
Running top
shows that the server is spinning at 100% CPU (one core).
Why does TeamCity hang so readily when run as a WAR? The stand-alone version doesn't seem to suffer from the same problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我对这个问题的两分钱:正如我在评论中告诉你的那样,我遇到了同样的问题,tomcat 挂起,java 的 cpu 使用率为 100%。这是随机发生的,解决它的唯一方法是终止进程。直到我关注这个有关内存使用情况的页面< /a>
当我遇到问题时,我的
JAVA_OPTS
中没有此选项:-XX:MaxPermSize=200m
,通过将其添加到环境变量上给出的其他java选项中,问题似乎得到了解决,现在TC已经运行了一天多,没有挂起。这是我的完整
JAVA_OPTS
行:希望这可以帮助您。
My two cents on this subject: as I've told you in my comment I was experiencing the same identical issue, tomcat hanging and java with 100% cpu usage. It was happen randomly and the only way to solve it was to kill the process. Until I followed this page about memory usage
When I had the issue I haven't this option in my
JAVA_OPTS
:-XX:MaxPermSize=200m
, by adding it to other java options given on the environment variable the issue seems to be solved, now TC is running for more than one day with no hangs.This is my full
JAVA_OPTS
line:Hope this can help you.
Java 6)
运行 tomcat 实例
并重新创建问题。
此时,分析器应该向您显示是什么占用了您的 CPU 时间。
Java 6)
running tomcat instance
and re-create the problem.
At this point the profiler should show you what is taking your CPU time.
以下是有关如何检测和报告 TeamCity 挂起的一些文档:
http:// confluence.jetbrains.net/display/TCD65/Reporting+Issues#ReportingIssues-HangsandThreadDumps
Here is some docs on how to detect and report TeamCity hangs:
http://confluence.jetbrains.net/display/TCD65/Reporting+Issues#ReportingIssues-HangsandThreadDumps
(我已经对其他答案投了赞成票,以感谢他们的努力,但他们都没有解决我的问题,所以我对自己的问题做出否定的回答。)
我已经放弃并解决了一个解决方法。我正在独立运行 TeamCity(不是作为 .war),并向我的防火墙添加了一个额外的 HTTPS 端口。在此配置中,TeamCity 可以完美运行。
如果有人能提供一个解决方案,并且不需要我再浪费三天的时间,我会很乐意将绿色勾号移给他们。
(I have up-voted the other answers to thank them for their efforts, but neither of them resolved my problem, so I am answering my own question in the negative.)
I have given up and settled for a work-around. I am running TeamCity stand-alone (not as a .war) and added an extra HTTPS port to my firewall. In this configuration, TeamCity works flawlessly.
If someone can provide a resolution that doesn't entail burning another three days of my life, I'll happily move the green tick across to them.
今天遇到这个问题,我执行了手动构建历史清理,TC 执行了干净的构建(再次收集所有更改)。
要通过网络浏览器访问此内容:
另外我清理了日志文件
had this problem today, i performed a manual Build History Clean-up and TC performed a clean build (collects all changes again).
to access this via the web browser:
additionally i cleaned up log files