查找 spring-data-mongo MappingContext 内存泄漏 [英] Find spring-data-mongo MappingContext memory leak

查看:60
本文介绍了查找 spring-data-mongo MappingContext 内存泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调试使用 spring-data-mongodb.1.9.1.RELEASE 的应用程序中的内存泄漏.

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

MongoMappingContext 使用了大约 三分之一的堆.它引用了近 3 万个 PersistentEntity 对象,总大小超过 140MB.

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

这种内存泄漏是由于持有对 MongoDB 数据对象的不必要的 引用而导致的,因此它们不能被垃圾收集.如果我从不在代码中引用这些 PersistentEntity 对象,为什么会在 MappingContext 中保存这么多对象?

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?

保留我的数据模型对象是否会导致 Spring Data MongoDB 保留它的数据模型对象?

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

推荐答案

看起来您遇到了 DATACMNS-855,已在最新的 Hopper SR2 中修复.

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

这篇关于查找 spring-data-mongo MappingContext 内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆