Question
Fresh Tomcat takes loong time to start up
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?
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.
×
The same for me. It’s not that it is slow when starting, it’s that it takes too long to even start doing something.
Any luck on this? I’m seeing this even with a bigger droplet with a fresh tomcat7 install.
I didn’t find any solution and since I’m just trying things out i could live with the longer wait.. although it’s annoying.
Try to install haveged - slow startup may occur when entropy pool runs dry.
@juriyfoboss Could you also comment why would Tomcat need to use entropy pool on fresh intall?
I’m getting about a 15 minute delay on both Tomcat install (fresh start) and even some service restarts. I’ve tried this even on larger droplet size (8GB RAM), not just the small size with the same issue.
Any progress or suggestions on this? (haveged did not work)
Just wanted to update this thread if anyone comes across it. The solution was kind of hidden amongst comments and on a hard to find page:
*On the the JAVA_OPTS line, add the following: -Djava.security.egd=file:/dev/./urandom"
*
Also - interestingly, after testing more with this, it seems that installing haveged (just apt-get install haveged with it’s default settings) does work as well. (without the additional line above).
(and using haveged is better for security due to the loss of true entropy on non-blocking /dev/urandom)
+1. saved my time. i am using $5 plan.
+1.
thanks for this @juriyfoboss.
haveged worked for me like a charm.
I am using $5 plan, too.
does the trick. Thanks to @juriyfoboss
I almost spent the entire day looking for a solution .Thanks apt-get install haveged.
I just spent several days thinking it was tomcat version, ubuntu version (had just upgraded), the firewall settings and the nginx proxy config I had fronting tomcat. I was trying to switch ports so after switching I thought I messed up the config somewhere but really it was just taking 10 mins to startup. DO this should really be part of the install instructions on setting up Tomcat with Ubuntu.
yeah, installing haveged did the trick, however, don’t get it why we need to install additional program to make it run fast )