TeamCity.war 挂在 Tomcat 中

发布于 2024-11-10 04:43:04 字数 304 浏览 3 评论 0原文

我一直在尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

箹锭⒈辈孓 2024-11-17 04:43:04

我对这个问题的两分钱:正如我在评论中告诉你的那样,我遇到了同样的问题,tomcat 挂起,java 的 cpu 使用率为 100%。这是随机发生的,解决它的唯一方法是终止进程。直到我关注这个有关内存使用情况的页面< /a>

当我遇到问题时,我的 JAVA_OPTS 中没有此选项: -XX:MaxPermSize=200m,通过将其添加到环境变量上给出的其他java选项中,问题似乎得到了解决,现在TC已经运行了一天多,没有挂起。

这是我的完整 JAVA_OPTS 行:

JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m -XX:+UseConcMarkSweepGC -XX:MaxPermSize=200m -Dteamcity.data.path=/var/lib/teamcity"

希望这可以帮助您。

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:

JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m -XX:+UseConcMarkSweepGC -XX:MaxPermSize=200m -Dteamcity.data.path=/var/lib/teamcity"

Hope this can help you.

怎会甘心 2024-11-17 04:43:04
  • 打开JVisualVM(在bin文件夹中
    Java 6)
  • 在“应用程序”下选择您的
    运行 tomcat 实例
  • 在 Profiler 选项卡下,单击 CPU
  • 稍等片刻,然后单击周围
    并重新创建问题。

此时,分析器应该向您显示是什么占用了您的 CPU 时间。

  • Open JVisualVM (in the bin folder of
    Java 6)
  • Under Applications choose your
    running tomcat instance
  • Under the Profiler Tab, click CPU
  • wait a moment and then click around
    and re-create the problem.

At this point the profiler should show you what is taking your CPU time.

抠脚大汉 2024-11-17 04:43:04

(我已经对其他答案投了赞成票,以感谢他们的努力,但他们都没有解决我的问题,所以我对自己的问题做出否定的回答。)

我已经放弃并解决了一个解决方法。我正在独立运行 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.

荒人说梦 2024-11-17 04:43:04

今天遇到这个问题,我执行了手动构建历史清理,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:

  • Administration down left hand menu,
  • click Build History Clean-up
  • start clean-up now.

additionally i cleaned up log files

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文