启动tomcat很慢,检查后发现:
[localhost-startStop-1]
org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [131,830] milliseconds。
主要时间都花在Creation of SecureRandom instance上了
。
解决办法:
先检查$JAVA_HOME/jre/lib/security/java.security中用的file:/dev/./random!是否前面少了个u!!如果是,改成file:/dev/urandom后,重启tomcat,sucess。