java heap size increasing

别等时光非礼了梦想. 提交于 2019-12-13 05:06:23

问题


I compile a jar file, and i write to the Log every half a minute to check threads and memory situation.

Attached are the start of the log, and the end of the day log, after this software was stuck, and stop working.

In the middle of the day several automatic operations happened. I received quotes about 40 per seconds, and finished to take care of every one of the quotes before the next came.

Plus, every 4 seconds i write a map with info to the DB.

Any ideas why heap size in increasing? (look at currHeapSize)

morning:

evening:


回答1:


Any ideas why heap size in increasing?

These are classic symptoms of a Java storage leak. Somewhere in your application is a data structure that is accumulating more and more objects, and preventing them from being garbage collected.

The best way to find a problem like this is to use a memory profiler. The Answers to this Question explain.



来源:https://stackoverflow.com/questions/14810303/java-heap-size-increasing

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!