users@glassfish.java.net

Re: Glassfish Web Services Slow to Crawl

From: <glassfish_at_javadesktop.org>
Date: Tue, 26 Oct 2010 10:16:25 PDT

Over the last 18 months of using Glassfish I have seen that 99% of the problems I've had with it had have been caused by my code, my misconfiguration, and bad network switches.

General advice and shots in the dark follow:

Make sure you are using the latest JDK.

If your codes calls out to SOAP web services make sure you only instantiate then once, in particular only instantiate JAXBContext for each one once, or you'll get a HUGE classloader leak.

As the other answerer said, profile it (with netbeans, YourKit, whatever) and see what's using up all the memory. In my case, when Glassfish got very slow it was because it was low on memory and running a full garbage collection very often.

When you installed, what profile did you use? Developer, Cluster, or Enterprise? Check your config/HTTP Service/RequestProcessing/Thread Count. For Developer profile that defaults to 5 and you want it higher (how much depends on how you need to tune for your app/environment), but at least push it up to 20 to try it out.
[Message sent by forum member 'culli']

http://forums.java.net/jive/thread.jspa?messageID=486282