解决:

下面两种方式都要添加上,速度会很快,启动妙级的


1)在Tomcat环境中解决

可以通过配置JRE使用非阻塞的Entropy Source。

在catalina.sh中加入这么一行:

JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom"

即可。

加入后再启动Tomcat,整个启动耗时迅速下降。

 

2)在JVM环境中解决

find / -name java.security


打开$JAVA_PATH/jre/lib/security/java.security这个文件,找到下面的内容:

securerandom.source=file:/dev/urandom
替换成
securerandom.source=file:/dev/./urandom


实例:

[root@host-10-1-1-103 tomcat]# find / -name java.security
[root@host-10-1-1-103 bin]# find / -name java.security
/usr/local/jdk/jre/lib/security/java.security
/usr/local/jdk/jdk1.8.0_171/jre/lib/security/java.security

 

 


3、mysql数据看的max_connection 连接数调大即可解决调到1000

相关文章:

  • 2022-12-23
  • 2021-07-05
  • 2021-11-29
  • 2022-12-23
  • 2021-09-21
  • 2021-09-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-20
  • 2022-01-15
  • 2021-07-28
  • 2021-06-10
  • 2022-12-23
相关资源
相似解决方案