tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Help in diagnosing server unresponsiveness
Date Mon, 04 Feb 2013 14:47:04 GMT
2013/2/3 Zoran Avtarovski <zoran@sparecreative.com>:
> Thanks for the reply Chris,
>
> The crash is more a hang than a crash as we don't get OOME. The app just
> stops responding and the monitoring data shows spikes in memory and CPU to
> 100% and then nothing. I can't find anything in the linux system logs or
> in the tomcat or java logs.
>
> My hope is that once I can work out what's happening I can then fix the
> cause, but at the moment I'm flying blind on this.
>

0. It seems that you have not mentioned what exact version of Tomcat
7.0.x you are using.


1. Using "JAVA_OPTS" to specify memory settings is wrong. The correct
variable is "CATALINA_OPTS".  See the comments at the top of
bin/catalina.sh

2. Beware of "PermGen" OOMs.

Note that if you exhaust the "PermGen" memory
- An OutOfMemory happens
- Runtime.freeMemory() still displays as if you had a lot of free
memory available.
- Your app cannot load any more classes
- The thread where OOM happened usually dies. In this case
Thread.uncaughtExceptionHandler is used and the OOM is printed to
stdout (catalina.out) instead of being logged through the logging
system.

Since 7.0.33 the Status page of the Manager webapp displays detailed
memory statistics. That page can also be retrieved as XML by adding
"XML=true" argument.

3. Beware of web bots that do not honor cookies and can create too
many new sessions in a short period of time.
Those can be countered with a CrawlerSessionManagerValve

http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html

Best regards,
Konstantin Kolinko

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


Mime
View raw message