FAQ / Memory

1. Preface

This page discusses various memory issues. In a nutshell - if your computer has less than 128MB of ram - you will probably have trouble. Anyhow, also read the following threads for other memory related issues:

Also look at JProbe, YourKit or OptimizeIt, or other profiling tools. Lots of people recommend these tools. This is not an endorsement for them, I just notice other people like them.

1.1. JSP Recompilation

If your application uses JSPs which are frequently recompiled at runtime, e.g. headers that change value hourly, please make sure to read the JSP HOW-TO page and RELEASE NOTES documents. You may wish to tune the JSP compiler configuration to prevent memory leaks. Of course, these are documents you should have read by now anyways..

2. Questions

  1. How do I adjust memory settings?

  2. Why do I get OutOfMemoryError errors?

  3. How much memory is Tomcat/webapp/??? using?

3. Answers

How do I adjust memory settings?

First look at java -X to determine what parameters to set. Then you can set them via the environment variable JAVA_OPTS. Read the files catalina.bat or catalina.sh for more information on JAVA_OPTS.

Why do I get OutOfMemoryError errors?

Many reasons.

See also OutOfMemory and MemoryLeakProtection.

How much memory is Tomcat/webapp/??? using?


CategoryFAQ

FAQ/Memory (last edited 2014-03-24 18:04:00 by ChuckCaldarale)