Question

Fresh Tomcat takes loong time to start up

Posted October 7, 2014 45.8k views

So I’m new to digitalOcean.
I began with ubuntu server and ran an tomcat installation on it according to this tutorial

And server start up takes really long time (“INFO: Server startup in 518366 ms”). I have one app on it that only has index.html file in it, just for testing.

What could be the cause of this? Is the Lowest bugget option on digitalocean really that slow?

13 comments

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
12 answers

Modify JAVA_OPTS in catalina.sh to get this up quickly. It didn’t seem to take effect under /etc/default/tomcat7 for me. What is important is the java.security.egd line. (Update the library path as needed.)

JAVA_OPTS=“-Djava.library.path=/usr/local/apr/lib -Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -Xmx1024m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC”

Another way is changing the option directly on the file. Check this: Check this: http://stackoverflow.com/questions/26431922/tomcat7-starts-too-late-on-ubuntu-14-04-x64-digitalocean. This resolved my problem.

This worked for me apt-get install haveged. It took me minutes for my page to reload for a restart.

+1.
This was hugely helpful. Solved the problem instantly just by installing haveged with defaults.
Thanks @juriyfoboss .

just installing haveged on Centos did not solve the issue, you have to start haveged service.

+1 to installing haveged. Thanks bro!

How is it that it takes a full day to get Tomcat up and running and so long to find this answer? I found this on the third page of google search. It would behoove DO to be on top of these, especially with such a simple setup - Ubuntu + Tomcat if they want to be a player.

+1 thank you very much “haveged” did the trick :)

“haveged” worked like charm.. :D .. Thanks a lot
Is it a cheat code? ;)

Thank you. The “haveged” trick worked instantly!

Thank you very much for this. “Haveged” works!

Submit an Answer