3

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.

7
  • 3
    Take a look at catalina.out to see where does it hang.
    – quanta
    Sep 4, 2012 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, 2012 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, 2012 at 14:09
  • I found this solution: disable the search component github.com/Heliosearch/heliosearch/commit/… and the document from solr wiki: wiki.apache.org/solr/…
    – Yuting Woo
    Jan 19, 2015 at 11:34
  • Two things you can see if they help. Does a pre-exploded war directory help improve the time, i.e. You do not deploy a compressed war file, but an uncompressed war directory. Second, not sure, but is there any entropy collection related steps going on in the background? On other full fledged app servers, I've seen that as a possible reason for delayed starts. Any possibility that tomcat servlet container does the same?
    – yetdot
    Aug 17, 2016 at 10:42

3 Answers 3

0

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.

1
  • It's Grails, not Ruby in Rails. I thought that the Grails war generation already precompliled the gsp files.
    – Henrik
    Sep 5, 2012 at 11:49
0

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?

1
  • I have some test data generation in the Bootstrap. But these are quite simple and should not cause this delay.
    – Henrik
    Sep 5, 2012 at 11:50
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .