Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a tomcat 7 installation on a Solaris 10 server. My problem is that starting the server (or deploying a new war) is extremely slow. It usually take 30 - 60 minutes. The war application is a medium sized grails application so there are quite a a lot of files. The server is running other server applications as well but from my basic skills I don't see this as a problem.

Can anyone give me some tips on how to analyse this? Settings in Tomcat, java, server, disc access or something else?

I use these parameters to tomcat:

CATALINA_OPTS="-Dcom.sun.management.jmxremote=true -Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=512m  -XX:MaxPermSize=512m -XX:+DisableExplicitGC"

And I use a 32 bit java 1.6.

share|improve this question
3  
Take a look at catalina.out to see where does it hang. –  quanta Sep 4 '12 at 6:46
    
It does not say anything. I'm deploying through the manager web ui. Could that be the problem? The actual upload of the war file takes only a couple of seconds, then it hangs and wait. –  Henrik Sep 5 '12 at 11:57
    
I think it's something with the grails war file. Deploying the apache solr war file only takes a few seconds. –  Henrik Sep 5 '12 at 14:09

3 Answers 3

Try to precompile Ruby files to Java classes for WAR file. It is done during WAR deployment nevertheless, so for why it take a lot of time... especially on SPARC machines. Offload compilation .rb files from server to your development machine.

share|improve this answer
    
It's Grails, not Ruby in Rails. I thought that the Grails war generation already precompliled the gsp files. –  Henrik Sep 5 '12 at 11:49

While pre-compiling your application might help I doubt it is causing a 30-60 minute delay to do so. Is it possible your application is running a bunch of on-start or data priming tasks that may be causing issues with the initial startup?

share|improve this answer
    
I have some test data generation in the Bootstrap. But these are quite simple and should not cause this delay. –  Henrik Sep 5 '12 at 11:50

How long does:

java -version

take to run where java is the java you use for your tomcat?

See this answer:

Performance issue with JVM (1.6.0_22) invoking OS command on Solaris 10

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.