Search code examples
tomcatteamcityosx-server

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.


Solution

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