为什么Glassfish管理控制台如此缓慢

为什么Glassfish管理控制台如此缓慢

本文介绍了为什么Glassfish管理控制台如此缓慢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行GlassFish Server Open Source Edition 3.0.1(版本22)。无论是在我的开发环境(Mac OSX,4核和8GB RAM)还是生产环境(Linux,2核,4GB)中,控制台的启动都非常缓慢。

机器很大程度上处于闲置状态。什么是glassfish在做什么?有什么需要调整以使其启动速度更快?

更新1

示例 - 我一直在尝试复制某些已在本地实施和测试的JDBC配置,直到我的服务器。我刚刚浪费了一小时试图复制配置,因为我无法同时开启dev和prod glassfish控制台,而没有其中一个超时。



我会得到dev控制台打开,然后终于生成一个,但是当我在我的开发窗口中单击它已经超时,现在尝试重新启动自己。

这是疯了。一个小时来复制一个简单的JDBC连接?有没有人真的可以成功地在生产中使用它?



更新:2

我发现两件事情有很大的不同:


  1. glassfish UI的Ajax方面看起来非常脆弱。我打开了两个浏览器选项卡,一个是 localhost:4848 ,另一个是 localhost:9000 。第一个选项卡是实际在本地主机上运行的glassfish服务器。第二个是远程服务器,通过ssh将其转发为本地服务器。通常情况下,这不是问题,但我怀疑它会将glassfish中的会话处理混淆为在同一个主机上看到两台服务器,即使它们位于不同的端口上也是如此。

  2. 我将3.0更新为3.1。这似乎消除了很多启动延迟。


我希望这篇文章可以帮助别人不受影响这种创伤。感谢大家的建议。

解决方案

它可能与Glassfish更新模块有关。

在每个控制台启动期间,更新模块会尝试对所有可用更新进行计数。自从使用GF 3.0.1以来,自从2月28日发布新的Glassfish 3.1以来,有很多更新。可以有多达70个更新或更多,更新服务器必须处理自那一天以来的很多请求。



我有同样的问题。但我可以通过最终在Glassfish的Jira中找到一个好的讨论主题来解决它。 。您不需要阅读整篇文章,请查看来自Sun,2009年12月13日12:42:48的摘要文章。



总结文章(详细信息可在此处找到):


  1. 为glassfish配置添加jvm选项,以禁用管理控制台的网络访问


  2. 希望这会有所帮助!

    >

    I'm running GlassFish Server Open Source Edition 3.0.1 (build 22). Both in my dev environment (Mac OSX, 4 cores and 8GB RAM) and production (Linux, 2 cores, 4GB) the console is painfully slow to start up.

    The machine is largely idle. What is glassfish doing? Is there anything that to be tweaked to make it start up faster?

    Update 1:

    Example- I've been trying to replicate some JDBC configuration that I have implemented and tested locally up to my server. I've just wasted an HOUR trying to copy the configuration over because I can't get both the dev and prod glassfish consoles to open simultaneously without one of them timing out.

    I'd get the dev console to open, then finally the prod one, but when I click back in my dev window it has already timed out, and now tries to restart itself.

    This is insane. An hour to replicate a simple JDBC connection? Does anyone really manage to use this in production successfully?

    Update: 2

    I found two things that made a huge difference:

    1. The Ajax aspects of the glassfish UI seem very fragile. I had two browser tabs open, one to localhost:4848, and another to localhost:9000. The first tab was to a glassfish server actually running on localhost. The second was a remote server, port-forwarded to appear as a local server via ssh. Normally this is not an issue, but I suspect that it confuses the session-handling in glassfish to see two servers on the same "host", even if they are on different ports.

    2. I updated my 3.0 to 3.1. This seems to have removed a lot of the start-up delay.

    I hope this post helps someone else not suffer this trauma. Thanks everyone for your suggestions.

    解决方案

    It may be related to the Glassfish update module.

    During each console start-up the update module tries to count all available updates. Since you use GF 3.0.1 there are a lot of updates since Feb 28, when the new Glassfish 3.1 was released. There can be up to 70 updates or more and the update servers have to handle a lot of requests since that day.

    I had the same problem. But I could solve it by finally finding a good discussion thread in Glassfish's Jira. Look here for possible solutions. You do not have to read the whole thread, look for the summary-post from Sun, 13 Dec 2009 12:42:48 by Anissa Lam.

    To sum up this article (details can be found there):

    1. Add a jvm-option to glassfish configuration in order to disable network access for the admin console
    2. Rename the update module in your glassfish modules directory.

    Hope this helps!

    这篇关于为什么Glassfish管理控制台如此缓慢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 07:14