Thody Thody - 1 year ago 134
Java Question

War deployment on Tomcat takes ages

I have a Grails application, built to a war file (~30mb). When I attempt to deploy the war file on Tomcat 6 via the application manager, it takes upwards of 10 minutes to deploy, or hangs indefinitely. When it hangs I can restart Tomcat and the app is usually deployed, however sometimes I have to repeat the process. I've also noticed that during deployment, the Java process maxes out the CPU and the RAM is at ~10-15%.

I'm fairly new to Java, so I don't know if this is normal, but I can't imagine how it could be. Is there something I can do to make this run smoother/faster? Is there a better way to deploy than Tomcat's app manager?

Answer Source

I upload the WAR to my home directory, cd to /usr/local/tomcat, then run the following commands:

rm webapps/ROOT.war
rm -rf webapps/ROOT
cp ~/ROOT.war webapps
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download