首页 > 代码库 > Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [32,176] milliseco

Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [32,176] milliseco

有一次,我启动tomcat时,居然花费了33秒。我不理解为什么一个新的tomcat,需要这么久,

网上查找后,找到了一个解决方法。

# vim /usr/local/tomcat/bin/catalina.sh
---------------------------------------------------
JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom"
---------------------------------------------------

重新启动,发现时间变成1秒。

Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [32,176] milliseco