Skip to content

Troubleshooting

joesondow edited this page Jun 27, 2012 · 20 revisions

Troubleshooting

Logs

Follow the server logs in case of errors:

  • apache-tomcat-x/logs/catalina.out
  • apache-tomcat-x/logs/asgard.log

If you cannot determine the solution, post in the Asgard user forum linked from Support.

Increase JVM heap size for larger accounts

If your account contains a large number of cloud objects you might need to increase Asgard’s memory footprint. It’s also advisable to change the JVM garbage collection settings. To do make these changes, create a setenv.sh file in apache-tomcat-x/bin/ similar to the following code block, then restart Tomcat.

    if [ "$1" == "start" ]; then
            export JAVA_OPTS=" \
            -verbose:sizes \
            -Xmx4g -Xms4g \
            -Xmn2g \
            -XX:MaxPermSize=128m \
            -XX:+HeapDumpOnOutOfMemoryError \
            -XX:-UseGCOverheadLimit \
            -XX:+ExplicitGCInvokesConcurrent \
            -XX:+PrintGCDateStamps -XX:+PrintGCDetails \
            -XX:+PrintTenuringDistribution \
            -XX:+CMSClassUnloadingEnabled \
            -XX:+UseConcMarkSweepGC \
        "
    else
        export JAVA_OPTS=""
    fi

Get a thread dump from Tomcat

If you want to diagnose the state of a misbehaving server, run this command to dump the current threads to catalina.out: kill -3 `ps -ef | grep java.*tomcat | grep -v grep | awk '{print$2}'` &

Kill Tomcat process if stuck

On Mac or Linux, if shutdown.sh does not successfully stop Tomcat, run this command to kill the Tomcat process: kill -9 `ps -ef | grep java.*tomcat | grep -v grep | awk '{print$2}'` &

Clone this wiki locally