Find spring-data-mongo MappingContext memory leak

丶灬走出姿态 提交于 2019-12-11 05:55:14

问题


I'm debugging a memory leak in my application which uses spring-data-mongodb.1.9.1.RELEASE.

MongoMappingContext is using up about a third of the heap. It has a reference to almost 30k PersistentEntity objects totaling over 140MB.

This memory leak is caused by holding unnecessary references to MongoDB data objects so they can't be garbage collected. Why might so many of these objects be held in the MappingContext if I never reference these PersistentEntity objects in my code?

Does holding on to my data model objects cause Spring Data MongoDB to hold onto it's data model objects?


回答1:


Looks like you're running into DATACMNS-855, which has been fixed in the latest Hopper SR2.



来源:https://stackoverflow.com/questions/38109957/find-spring-data-mongo-mappingcontext-memory-leak

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