Skip to main content

Glassfish runs very slow.

18 replies [Last post]
maksimu
Offline
Joined: 2009-02-08

I have finished my Enterprise project and trying to deploy it to the production server.
When I start glassfish using NetBeans 6.5 it runs very fast but when I start server as a service or from command line everything is very slow, even when I go to the Server's control panel (localhost:4848).

I tried it on my partner's computer, dev server, and prod server - same results.

We are using Win. 2003 for our Dev and Prod server and dev. computers are on XP.
JRE is 1.6.0.07

Any idea what can cause this?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
maksimu
Offline
Joined: 2009-02-08

> I checked your logfile and saw:
>
> -Dcom.sun.aas.classloader.serverClassPath.ee=Does not
> exist/lib/hadbjdbc4.jar,C:/Sun/AppServer/lib/SUNWjdmk/
> 5.1/lib/jdmkrt.jar,Does not
> exist/lib/dbstate.jar,Does not
> exist/lib/hadbm.jar,Does not
> exist/lib/hadbmgt.jar,C:/Sun/AppServer/lib/SUNWmfwk/li
> b/mfwk_instrum_tk.jar
>
> I don't think the path "Does not exist" exists, but I
> could be wrong. Fix this first.
>
>
> Johan

I can't find the solution "Does not exist" jar file error. Any idea why it's there?

Snjezana Sevo-Zenzerovic

FWIW, references to "Does not exist" directory are expected (although
somewhat confusing) in this installation since relevant directory/jars
are delivered only in GlassFish distribution with HADB. This is not
related in any way to performance issues...

glassfish@javadesktop.org wrote:

>>I checked your logfile and saw:
>>
>>-Dcom.sun.aas.classloader.serverClassPath.ee=Does not
>>exist/lib/hadbjdbc4.jar,C:/Sun/AppServer/lib/SUNWjdmk/
>>5.1/lib/jdmkrt.jar,Does not
>>exist/lib/dbstate.jar,Does not
>>exist/lib/hadbm.jar,Does not
>>exist/lib/hadbmgt.jar,C:/Sun/AppServer/lib/SUNWmfwk/li
>>b/mfwk_instrum_tk.jar
>>
>>I don't think the path "Does not exist" exists, but I
>>could be wrong. Fix this first.
>>
>>
>>Johan
>>
>>
>
>I can't find the solution "Does not exist" jar file error. Any idea why it's there?
>[Message sent by forum member 'maksimu' (maksimu)]
>
>http://forums.java.net/jive/thread.jspa?messageID=330934
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

stevesunblade
Offline
Joined: 2008-03-22

We run two App Servers:-

Sun App Server 9.1 on Linux:- Fast control panel:4848 and fast deploy times
Glassfish V2 on Solaris 10 (on Sun X2100): Slow control panel:4848 and slow deploy time.

So not sure if it's a virus cheking issue.

jcstover
Offline
Joined: 2007-11-01

Maybe a reinstall of glassfish will work. Looks like on setup something went really wrong

Johan

maksimu
Offline
Joined: 2009-02-08

But it was pretty fast few days before, I don't think the problem is in installation because same thing happens on my laptop and dev server. I think netbeans loads something to the memory.

ranob
Offline
Joined: 2007-08-15

Hello all,

It happens to me to. glassfish goes fast, and at a time, it goes very slow. I have changed anything. Buy now, the sam applications takes 2 mintues to deploy and before only 10 seconds.

I have noticed this behavior in windows xp and Macos X

any idea?

Because this is not serious...

Regards,
Alberto

maksimu
Offline
Joined: 2009-02-08

I think I know what the problem is.
Alberto, try this:

1) Install VisualVM
2) Restart your Glassfish
a) in Terminal type: asadmin stop-domain domain1
b) in Terminal type: asadmin start-domain domain1
3) Open VisualVM and add your server (if you the server is remote) using following connection:
service:jmx:rmi:///jndi/rmi://[machineName/or IP]:8686/jmxrmi
4) Try to redeploy your app several times and you will see in VisualVM that your memory is going up every time your redeploying it.

I have figure our the problem with my server. The problem was PermGen memory never clears. So, every time when i redeploy my app I have to restart Glassfish instance.

Read more here http://blogs.sun.com/fkieviet/entry/how_to_fix_the_dreaded

Let me know if this helps.

Thanks

Message was edited by: maksimu

ranob
Offline
Joined: 2007-08-15

thx for your help maksimu.

But when the glassfish starts to go slow, and I restart it, it continues in "slow mode" I it takes too much time to start up. In my case I don´t think the problem comes with the number of times I deploy my application. But anyway, I am gonna try what you suggested.

Thx again,
Ranob

maksimu
Offline
Joined: 2009-02-08

OK, do you use NetBeans to start your server or command line?
If you used NB than it changed some configs in domain-web.xml. Search for "NetBeans" there and see if it is there. that was the thing causing slowdown in my case.

ranob
Offline
Joined: 2007-08-15

I usually use command line to startup glassfish, however I have configured the glassfish domain inside netbeans, and I do the deployments with netbeans.

I havent find any file named "domain-web.xml".

What it´s true is that after many deployments without restarting glassfish, the PermGen memory runs out of memory

Regards,
Ranob

Alex Sherwin

Here is a good article on the PermGen issue.

http://blogs.sun.com/fkieviet/entry/how_to_fix_the_dreaded

It's difficult to tackle, but is possible to avoid with careful planning
from the early stages of design of your app

glassfish@javadesktop.org wrote:
> I usually use command line to startup glassfish, however I have configured the glassfish domain inside netbeans, and I do the deployments with netbeans.
>
> I havent find any file named "domain-web.xml".
>
> What it´s true is that after many deployments without restarting glassfish, the PermGen memory runs out of memory
>
> Regards,
> Ranob
> [Message sent by forum member 'ranob' (ranob)]
>
> http://forums.java.net/jive/thread.jspa?messageID=332295
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

jcstover
Offline
Joined: 2007-11-01

I checked your logfile and saw:

-Dcom.sun.aas.classloader.serverClassPath.ee=Does not exist/lib/hadbjdbc4.jar,C:/Sun/AppServer/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,Does not exist/lib/dbstate.jar,Does not exist/lib/hadbm.jar,Does not exist/lib/hadbmgt.jar,C:/Sun/AppServer/lib/SUNWmfwk/lib/mfwk_instrum_tk.jar

I don't think the path "Does not exist" exists, but I could be wrong. Fix this first.

And this case with company policies, first double check if McAfee is doing an 'On Access' scan of zipfiles, try to find out if you can let it configure it so that the jar aren't scanned. If that ain't possible tell your boss that if the virusscanner is kept in place, then he gets a crappy performance and suggest moving your DEV and PROD server over to an operating system not supported by McAfee.

Johan

maksimu
Offline
Joined: 2009-02-08

I think you are right, some jars are missing or something.
When we have NetBeans running but start Glassfish from command line, it is running very fast but when NetBeans is closed then everything is very slow.
Right now i'm searching for the solution but if someone can point me to the right direction it would be awesome.
When I get something i'll post it here.

Thanks

maksimu
Offline
Joined: 2009-02-08

Also I want to add that the server is not dedicated, it is Virtual Machine with Win2003. The app is running unacceptably slow, but later today it was pretty fast. Can this have any impact on the performance?

jcstover
Offline
Joined: 2007-11-01

Check out your logfiles (logs/server.log) Upon starting glassfish it logs also the system properties. Compare these with the log files from your production server.

One thing that comes in mind is a virusscanner. I had the experience with McAfee scanning zip files upon opening. And it sees jar files as zip files. It made my Netbeans run unworkable slow.

Johan

maksimu
Offline
Joined: 2009-02-08

Both log files are same (see attached file).
Antivirus could be the problem. In our company we are using McAfee Antivirus.
But what if I don't have any rights to change antivirus configs because of company policies what else can we do?

maksimu
Offline
Joined: 2009-02-08

It's just impossible to work with prod. server.
My .ear file is about 35 megs and to deploy/undeploy it takes about 15 min. and then when I open any page it takes about 3 min to load it.
I think something is missing in network configuration.
any idea?

oaleem80
Offline
Joined: 2014-09-17

i installed glassfish 4. My application from browser runs fine locally but from outside the server if i acess my app with more then 2 users. Then it runs v slow.