[英]Find spring-data-mongo MappingContext memory leak
I'm debugging a memory leak in my application which uses spring-data-mongodb.1.9.1.RELEASE
. 我在我的应用程序中调试内存泄漏,它使用
spring-data-mongodb.1.9.1.RELEASE
。
MongoMappingContext
is using up about a third of the heap . MongoMappingContext
占用了大约三分之一的堆 。 It has a reference to almost 30k PersistentEntity
objects totaling over 140MB. 它引用了大约超过140MB的近30k
PersistentEntity
对象。
This memory leak is caused by holding unnecessary references to MongoDB data objects so they can't be garbage collected. 此内存泄漏是由于对MongoDB数据对象进行不必要的引用而导致的,因此无法对其进行垃圾回收。 Why might so many of these objects be held in the
MappingContext
if I never reference these PersistentEntity
objects in my code? 如果我从未在代码中引用这些
PersistentEntity
对象,为什么可能会在MappingContext
保存这么多这些对象?
Does holding on to my data model objects cause Spring Data MongoDB to hold onto it's data model objects? 持有我的数据模型对象会导致Spring Data MongoDB保留它的数据模型对象吗?
看起来你遇到了DATACMNS-855 ,它已在最新的Hopper SR2中修复。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.