由于SecureRandom,在Tomcat 7.0.57上启动缓慢 [英] Slow startup on Tomcat 7.0.57 because of SecureRandom

查看:630
本文介绍了由于SecureRandom,在Tomcat 7.0.57上启动缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在CentOS 6.6 32位和openJDK7上使用Tomcat 7.0.57。
当我在服务器(生产环境)上启动14个不同的Tomcat实例时,其中很多都需要花费太多时间才能启动。

I'm using Tomcat 7.0.57 on CentOS 6.6 32 bit and openJDK7. When I start 14 different instances of Tomcat on my server(production environment), many of them take too much time to start.

这是启动日志,告诉我一直在哪里花费

This is part of the startup log, which tells me where is taking all the time

Jan 28, 2015 2:49:41 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [199,620] milliseconds.

此问题的最佳做法/解决方案是什么?

What's the best practice/solution for this problem?

谢谢!

推荐答案

安全随机调用可能会被阻塞,因为没有足够的熵来提供它们/ dev / random。

The secure random calls may be blocking as there is not enough entropy to feed them in /dev/random.

如果你有一行

securerandom.source=file:/dev/random

在/jre/lib/security/java.security中,更改此项到urandom可以改善一些事情(尽管这可能已经是默认值)。

in /jre/lib/security/java.security, changing this to urandom may improve things (although this is probably already the default).

或者有一些关于如何在这里提供游泳池的建议

Alternatively there are some suggestions on how to feed the pool here

https://security.stackexchange.com/questions/89 / feeding-dev-random-entropy-pool

这篇关于由于SecureRandom,在Tomcat 7.0.57上启动缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆