Exception java.lang.OutOfMemoryError: requested
If you see this symptom, consider increasing the available swap space by allocating more of your disk for virtual memory and/or by limiting the number of applications you run simultaneously. You may also be able to avoid this problem by setting the command-line flags -Xmx and -Xms to the same value to prevent the VM from trying to expand the heap. Note that simply increasing the value of -Xmx will not help when no swap space is available.


3 comments:
I think you can get OutOfMemoryError when you run out of Perm Generation space too...
Also a recursive call can exhaust stack frames for a particular thread that will cause OutOfMemoryError.
Your default response to an OutOfMemoryException should be to review your logs, use a memory profiler, etc. You should verify that you don't have a resource leak and/or that you aren't inadvertantly consuming more memory then neccessary. Allocating more resources to the JVM may mask a serious problem in your code.
Post a Comment