Home > Article > Operation and Maintenance > Solution to the very slow startup of Tomcat service
This article introduces the solution to the very slow startup of the Tomcat service, and focuses on the specific steps. The content of this article is compact, and I hope everyone can gain something.
Tomcat service starts very slowly
Problem symptoms
Tomcat starts very slowly. Check the log as follows.
Cause of the problem
SecureRandom is a problem with the jre tool class.
Solution
Solution in Tomcat environment
You can use non-blocking by configuring JRE Entropy Source.
Add the following content to the catalina.sh file,
-Djava.security.egd=file:/dev/./urandom
After adding it, restart Tomcat, check the Tomcat service startup log, and the startup time will be reduced.
Solved in the JVM environment
Open the file $JAVA_PATH/jre/lib/security/java.security.
Find the following content in the file.
securerandom.source=file:/dev/urandom
Replace the content with the following
securerandom.source=file:/dev/./urandom
Applies to
Cloud Server ECS
The above is the detailed content of Solution to the very slow startup of Tomcat service. For more information, please follow other related articles on the PHP Chinese website!