Article:
 |
 |
Three Rules for Effective Exception Handling
|
| Subject: |
Not, reasonable application SHOULD catch it |
| Date: |
2007-11-06 14:01:42 |
| From: |
zolyfarkas |
|
Response to: Not, reasonable application SHOULD catch it
|

|
OOM can be thrown in the thread that is not actually causing the memory exhaustion. This makes recovery from a OOM almost impossible.
OOM is best handled by running VM with: -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${DUMPS} -XX:OnOutOfMemoryError="kill -9 %p" |