Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the Glassfish admin console so slow?

Tags:

glassfish

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.

like image 680
George Armhold Avatar asked Mar 11 '11 22:03

George Armhold


1 Answers

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!

like image 107
Matt Handy Avatar answered Sep 18 '22 14:09

Matt Handy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!