简体   繁体   中英

Java EE heap dump on Out of Memory

I am using EJB v3.1. Application is running in JBoss. I'm also using Wildfly. As I understand all System Exceptions including OutOfMemoryError are wrapped in EJBException. I set jvm parameters to get heap dump on Out of Memory like this: -XX:+HeapDumpOnOutOfMemoryError but it doesn't work. I suppose because it is no longer OutOfMemoryError but EJBException.
How do I get this working in jave ee? Also should i get the heap dump when throwing new OutOfMemoryError?

How do I get this working in jave ee? Also should i get the heap dump when throwing new OutOfMemoryError?

If you're using JBoss, you should see the server.log and see if the exception is EJB or OOME, then try to fix it.

So we have:

How do I get this working in jave ee? See the exception. Also should i get the heap dump when throwing new OutOfMemoryError? Yes, if you're correctly using the flag: -XX:+HeapDumpOnOutOfMemoryError

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM