2013/2/3 Zoran Avtarovski <zo...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to