简体   繁体   中英

Determine root cause of java out of memory error

I am getting a websphere error..on further research it was mentioned that it was due of Java Out of memory. I am not familiar with JAva Heap and GC. I just modified few classes of code for an enhancement. This applicaiton had no issues until now. Therefore I am leaning towards the modified code is causing issues.

How do I determine which object(s) is causing the oom error.

检查您是否递归调用任何方法或无限循环而没有任何中断,否则您应该共享您的代码以使我们能够为您提供帮助

Post the error message. It could be you have to increase the heap size (using -Xmx xxxx flag) because the application just needs some more memory than it used to (for whatever reason noone can tell by the information you have given). You could also use -XX:+HeapDumpOnOutOfMemoryError to get more information.

Take a heap dump and thread dump when ever oom error occur it help to find the rca for this

Increse your jvm heap size as Xms as 512 and Xmx 1024

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