We have been struggling to diagnose the cause of an OutOfMemoryError we experienced on one of our production servers. Our attempts to reproduce the issue in soak tests have so far failed, and we are considering enabling -XX:+HeapDumpOnOutOfMemoryError
on our production servers, so that if it does happen again, at least we'll have some data.
Is it wise to enable this setting on production servers?