0

JVM facing out of memory problem. When this occurs I am unable to connect it using jvisual vm also. It like jvm is not responding to any request. I kept the jvisual window open, without any warning or any error on tool it just got disconnected. Now, when I monitor on jvisual vm(when jvm is normal). I see like this enter image description here

Now, I am unable to actually tell if JVM is in real problem or not, until this tool stops responding, I would like to get some sort of alert. Also OOM is not cause memory is getting filled up. The thread count is increasing and finally OOM(unable to create new native thread error). Any how I solved the problem, for future use, I would like to build or any software which provide that feature

Aadam
  • 1,521
  • 9
  • 30
  • 60
  • Have you checked the logs of the application? If an OutOfMemoryError happens generally it is written on the logs. – Davide Lorenzo MARINO Sep 22 '16 at 12:39
  • 1
    I'm not sure I understand what you are looking for but regarding OOME, you can add -XX:+HeapDumpOnOutOfMemoryError to your launch command to get a heap dump anytime your JVM faces an OOME allowing to investigate later – Nicolas Filotto Sep 22 '16 at 15:19
  • @Davide I get OutOfMemoryError in logs. Nicolas, yes that is true, but a tool must give some sort of alert in advance right? – Aadam Sep 23 '16 at 05:56
  • you can use `-XX:OnOutOfMemoryError=< string >` . This is used to specify a command or script to execute when an OutOfMemoryError is first thrown. String can be for example "mail alert@mycompany.com | kill -9 %p" – commit-man Sep 24 '16 at 22:03
  • will give this a try -XX:OnOutOfMemoryError=< string >. Still by the time I could do anything JVM will already be dead, I want a something which could predict that JVM is about to die due to this this and this. like that – Aadam Sep 29 '16 at 07:26

0 Answers0