开发者

Why is the Glassfish admin console so slow?

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!


No, it's not just you. The Glassfish 3 admin GUI sucks horribly, and as far as I can tell, there's nothing that can be done about it. But I did notice that all the problems seem to be in the presentation layer. If I'm using asadmin, or making AJAX calls directly, then the performance is reasonable. The best thing to do is to figure out how you can do what you need without using the GUI. Start by learning the asadmin commands for tasks that you do often, like deploying and undeploying applications.

If I wanted to copy the JDBC configuration from one instance to another, I'd just open the domain.xml files and manually copy the jdbc-resource and jdbc-connection-pool elements. (There's probably a way to do that 'correctly' with asadmin, but learning how to do it would take me ten times longer than doing it the 'incorrect' way, so I never bothered.)


You definitely have some kind of network timeout happening. Those operations should take seconds. Is there anything useful in the server.log? A lot of hang issue tend to be related to DNS reverse lookups. A network snoop would show you what it's trying to access.


we disabled the automatic updates via the update tool preferences and the problem was resolved Note that you need to install the update tool to do so


Personally, Iam using a laptop and I had the same exact problem. I found out that my device was running in low power state mode. Once I changed it to balanced power consumtion all the time consuming processing got reduced very much.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜