从 NetBeans 到 Glassfish 的部署非常慢
我有一个包含几十个 EJB 的项目和一个 Web 项目,我试图将其从笔记本电脑上的 NetBeans 7.0.1 直接部署到 Solaris 10 服务器上的 Glassfish 3.0.1。忽略复制ear文件的传输时间,部署似乎需要很长的时间(3分钟是我见过的最快的)。部署的性能似乎随着时间的推移而下降,最终我不得不重新启动我的域。我发现在重新部署应用程序几次后,部署需要 12 到 20 分钟。
我通过右键单击 NetBeans 中的主项目并选择“部署”来进行部署。我有什么选择可以使其更有用?我可以提供哪些附加信息来帮助追踪问题的根源?
更新:让最近的部署运行完成,它在我的日志中以以下错误消息结束:
[#|2011-08-20T14:05:54.494-0400|SEVERE|glassfish3.1|javax.enterprise.system。 tools.admin.org.glassfish.deployment.admin|_ThreadID=2490;_ThreadName=Thread-1;|加载应用程序时出现异常: EJB容器初始化错误 java.lang.OutOfMemoryError:Java堆空间 |#]
所以这似乎与内存有关。部署本身运行了 10 多分钟,然后就以这种方式终止了。
I have a project with a few dozen EJBs and a web project that I'm attempting to deploy from NetBeans 7.0.1 on my laptop directly to Glassfish 3.0.1 on a Solaris 10 server. Ignoring the transfer time of copying the ear file, the deployments seem to take a very long time (3 minutes is the fastest I've seen it). The performance of deployments seems to degrade over time, to the point where eventually I have to restart my domain. I've seen a deployment take anywhere from 12-20 minutes after I've redeployed my application a few times.
I deploy by right-clicking my main project in NetBeans and picking "Deploy". What options do I have for making this more usable? What additional information can I provide to help track down the source of the problem?
UPDATE: Letting the most recent deployment run through to completion, it ended with the following error message in my log:
[#|2011-08-20T14:05:54.494-0400|SEVERE|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=2490;_ThreadName=Thread-1;|Exception while loading the app : EJB Container initialization error
java.lang.OutOfMemoryError: Java heap space
|#]
So this does appear to be memory related. The deployment itself ran for over 10 minutes before dying in this manner.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于我的应用程序的要求,我必须将堆空间从默认的 512MB 分配增加到最小/最大 1GB/2GB。这似乎稍微改进了部署。我现在的典型部署时间约为 1 分钟。虽然不是很出色,但至少是可以忍受的。
Because of my application's requirements, I had to increase the heap space from the default 512MB allocation to a min/max of 1GB/2GB. This seems to have improved deployment slightly. My typical deployment time is ~1 minute now. It's not stellar, but it's at least tolerable.
这是 Glassfish 焊接集成模块中的严重错误造成的。如果没有这个 bug,部署数量将超过 20!比以前快了好几倍。
http://java.net/jira/browse/GLASSFISH-18875
请投票获取尽快解决这个问题!
This is the result of a serious bug in the weld-integration module of Glassfish. Without this bug the deployment is more than 20!! times faster as before.
http://java.net/jira/browse/GLASSFISH-18875
Please vote to get this fixed as soon as possible!