Glassfish / Hibernate的PermGen空间问题 [英] PermGen space issue with Glassfish/Hibernate

查看:258
本文介绍了Glassfish / Hibernate的PermGen空间问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Glassfish 3.1上运行GWT + Hibernate应用程序。几个小时后,我跑出了Permgen空间。这没有任何webapp重新加载。我正在运行 -XX:MaxPermSize = 256m -XmX1024m

I'm running a GWT+Hibernate app on Glassfish 3.1. After a few hours, I run out of Permgen space. This is without any webapp reloads. I'm running with –XX:MaxPermSize=256m –XmX1024m.

我接受了这个页面,发现我泄漏了大量的课程 - 我所有的Hibernate模型和我所有的GWT RequestFactory代理。

I took the advice from this page, and found that I'm leaking tons of classes- all of my Hibernate models and all of my GWT RequestFactory proxies.

上面引用的指南说检查链,找到意外的引用,并修复代码 。说起来容易做起来难。

The guide referenced above says to "inspect the chains, locate the accidental reference, and fix the code". Easier said than done.

类加载器总是指向 org.glassfish.web.loader.WebappClassLoader 的实例。进一步深入,我发现了许多来自 $ Proxy135 和类似命名对象的引用。但我不知道怎么回事。

The classloader always points back to an instance of org.glassfish.web.loader.WebappClassLoader. Digging further, I find lots of references from $Proxy135 and similar-named objects. But I don't know how else to follow through.

推荐答案

我通过迁移到Tomcat来解决这个问题。

I "solved" this by moving to Tomcat.

这篇关于Glassfish / Hibernate的PermGen空间问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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