Marcelo Cantos
Marcelo Cantos

Reputation: 185852

TeamCity.war hanging in Tomcat

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.

Upvotes: 2

Views: 1469

Answers (5)

nologo
nologo

Reputation: 6278

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

Upvotes: 0

Fabio
Fabio

Reputation: 19176

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.

Upvotes: 1

Marcelo Cantos
Marcelo Cantos

Reputation: 185852

(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.

Upvotes: 1

KIR
KIR

Reputation: 5692

Here is some docs on how to detect and report TeamCity hangs:

http://confluence.jetbrains.net/display/TCD65/Reporting+Issues#ReportingIssues-HangsandThreadDumps

Upvotes: 1

Sean
Sean

Reputation: 7737

  • 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.

Upvotes: 1

Related Questions