简体   繁体   中英

Running out of Heap/Tenured space

I'm having a problem and eclipse JVM. Looks like we have a memory leak
I have the following VisualVM screens:
[1] http://imgur.com/gcMAUBs "Heap"
[2] http://imgur.com/1ET1JBn "tenured"

We currenlty have the xms set at -Xms512m -Xmx1024m
The heap will just fill and the java application will freeze
Any suggestions on what we can do to troubleshoot/fix the issue?

There are many ways to go and inspect the allocated objects. However in my experience this will always suck you into phantom issues, and can take days or weeks.

What I think is typically the best way to solve this is to simply try disabling parts of your functionality and see when the leak goes away. As simple as that.

Perhaps this sounds too low-tech, but I have very good experiences with this way of debugging.

And one variation for if you cannot disable some functionality easily: call that function 10x instead and see if the memory leak accelerates.

If you are using a lot of memory and facing memory leaks, then I will suggest you to check your ArrayLists or HashMaps .

They could be the real culprits!

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