2011/3/18 Mark Thomas <ma...@apache.org>:
> On 18/03/2011 13:38, Francis GALIEGUE wrote:
>> On Fri, Mar 18, 2011 at 11:46, Mark Thomas <ma...@apache.org> wrote:
>>> My guess is that something is hanging somewhere, probably on some sort
>>> of network activity - although I can;t think what it might be. When it
>>> seems to be slow, take 2 or 3 thread dumps a couple of seconds apart.
>>> That should point you towards the but of code causing the problem.
>>>
>>
>> http://paste.pocoo.org/show/355534/
>>
>> On a 30 seconds start sequence, I collected 3 traces and all look like
>> this one. I don't see anything related to the manager webapp though :/
>
> I do. The session ID generator is waiting for sufficient entropy to seed
> the PRNG. The session ID generation in Tomcat 7 has been refactored for
> speed (once it starts ;) ) and security.
>

Just a note: Maybe it is worth to measure the time that the sessionId
generation takes (looking at the stack trace in [1]) and print some
warning if org.apache.catalina.util.SessionIdGenerator.getRandomBytes(
)
or
org.apache.catalina.util.SessionIdGenerator.generateSessionId( )
takes too long. I would say that more than 2 seconds would be too
long. Just saying.

[1] http://paste.pocoo.org/show/355534/

I see that ManagerBase.startInternal() already has debug logging
around that call, but the OP does not have debug logging enabled.

> You have a couple of options:
> 1. Wait (if this is production I'd wait)
> 2. Use a different secureRandomAlgorithm (see [1])
> 3. Use a different random source with:
>   JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom"
>   in setenv.sh
>
> 3 will reduce the security of your session IDs. 2 will probably reduce
> the security of your session IDs.
>
> Mark
>
> [1] http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html
>

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to