zoukankan      html  css  js  c++  java
  • Tomcat启动时Creation of SecureRandom instance for session ID很慢

    Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [112,140] milliseconds.

    主要时间都花在Creation of SecureRandom instance上了。

    网上所说的

    打开$JAVA_HOME/jre/lib/security/java.security这个文件,找到下面的内容:
            securerandom.source=file:/dev/urandom
        替换成    

            securerandom.source=file:/dev/./urandom

        然而还是没有解决我的这个问题。

    最后仔细检查了下,发现$JAVA_HOME/jre/lib/security/java.security中用的是file:/dev/random!前面少了个u!!

    所以上面的解决办法没生效就很正常了,改成file:/dev/urandom后,然后在重写部署一次项目启动就OK了!

  • 相关阅读:
    MySQL系列(三) MySQL的约束
    mysql 下载 国内 镜像
    ckeditor
    比较时间
    远程获取文件
    多线程一例
    requests
    json传递对象字典
    pymysql和mysqldb的区别
    sql
  • 原文地址:https://www.cnblogs.com/lhd1998/p/13370854.html
Copyright © 2011-2022 走看看