A JVM may run low on total free memory when there
is a memory leak, the JVM heap was sized too small or there was a
temporary abnormally high memory requirement (possibly for a very
large order or wave). If you encounter an OutOfMemory exception, we
recommend you perform the following:
- Restart the JVM with a much larger heap.
- Monitor the amount of space used. For Oracle and
HP HotSpot JVMs, you need to look at the heap used after Full GCs.
If you see this value steadily growing and never shrinking, you may
likely have a memory leak. If the heap used increases by a large value
(larger than your original heap setting) but eventually drops down
to its original level, you may have encountered a large order or wave.
You may want to investigate the nature of that order to see if the
order was an anomaly or if it is going to be recurring. You can use
the GC statistics to set you JVM heap sizes.
If you believe you have a memory leak, you can do
the following: