Hibernate:OOM-Exception,IdentityMap 有问题吗?
当加载大量对象时,我收到 OOM 异常。使用探查器分析堆后,我发现 org/hibernate/util/IdentityMap 中有大量内存,它引用了包含数千个条目的 LinkedHashMap。这些物体是用来做什么的?
我真的很感谢各种信息...
when loading lots of objects, I get a OOM-Exception. After analyzing the heap with a profiler, I see that there's a lot of memory in org/hibernate/util/IdentityMap which references a LinkedHashMap containing thousands of Entrys. What are those objects used for?
I'm really thankful for all kinds of information...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是持久化单元的实体缓存。也称为一级缓存。从数据库加载的所有实体都保存在此缓存中,因此可以从缓存中应答对已知实体的后续请求,而无需发出 SQL 查询。
This is the entity cache of the persistence unit. Also known as first-level cache. All entities loaded from the database are kept in this cache so subsequent requests for an already known entity can be answered from the cache without issuing SQL queries.