tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Hamant ...@ow2.org>
Subject SecureRandom instance for session ID generation using [SHA1PRNG] took [510,962] milliseconds !
Date Fri, 03 Oct 2014 09:26:56 GMT
Hi there,

Here is my config

Server version: Apache Tomcat/8.0.14
Server built:   Sep 24 2014 09:01:51
Server number:  8.0.14.0
OS Name:        Linux
OS Version:     3.13.0-36-generic
Architecture:   amd64
JVM Version:    1.7.0_65-b32
JVM Vendor:     Oracle Corporation


The virtual (qemu) server runs with 4GB RAM

I have two tomcat instances running on the same server with setenv.sh 
set to:
-Xmx800m -XX:MaxPermSize=192m

Here is my problem:
I have two configured instances on this server
After some time playing with stopping and starting with those instances 
began to take AGES to startup (~10min)

03-Oct-2014 09:11:05.973 INFO [localhost-startStop-1] 
org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom 
Creation of Sec
ureRandom instance for session ID generation using [SHA1PRNG] took 
[510,962] milliseconds.
(...)
03-Oct-2014 09:11:41.134 INFO [main] 
org.apache.catalina.startup.Catalina.start Server startup in 547454 ms


Thread which takes age running SeedGenerator :

"localhost-startStop-1" daemon prio=10 tid=0x00007fe3ac001800 nid=0x580b 
runnable [0x00007fe3b55da000]
    java.lang.Thread.State: RUNNABLE
         at java.io.FileInputStream.readBytes(Native Method)
         at java.io.FileInputStream.read(FileInputStream.java:272)
         at 
sun.security.provider.SeedGenerator$URLSeedGenerator.getSeedBytes(SeedGenerator.java:551)
(...)


Workaround:

I tried to add -Djava.security.egd=file:/dev/./urandom with success (in 
setenv.sh).
But why would I *suddendly* have to use this additional param ? Never 
got this problem in tomcat before...
Could it be linked to the VM ?

Thanks

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message