Random Glassfish Tuning Debugging Notes

From my point of view it is hard to find information about Glassfish Tuning and Debbuging as there are so much and around. Therefor I'll try to put notes and resources together on this Topic.


How can I configure Glassfish to use a 64-bit JVM?

If you need to break the 2GB or 4GB heap (depending on your OS/JVM) maximum barrier for your GlassFish-powered application, you can move to a 64-bit JVM.  The following applies to the Glassfish "developer" and "cluster" profiles.

To do so :

  • make sure you have a 64-bit JVM properly installed
  • adjust the AS_JAVA variable in GLASSFISH_HOME/config/asenv.conf (applies to an entire install, not to a specific domain or instance)
  • replace the -client or -server option with -d64 in the domain jvm-options (use the Admin tool or asadmin create-jvm-options rather than editing domain.xml).       


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

It worked after doing below steps:

  • Reinstalled 1.6.0_07 64 bit jdk.
  • added -d64 to asadmin script
  • added <jvm-options>-d64</jvm-options> to domain.xml
  • Changed <jvm-options>-client</jvm-options> to <jvm-options>-server</jvm-options>



Glassfish "hangs"?

[Thanks to oleksiys but I've to correct some minor issues on this Topic.]

When you found that Glassfish is not responsive - please take a snapshot of threads dump:

Find the pid of the Glassfish process:

/usr/ucb/ps -auxwww | grep java | grep <install instance of glassfish>

Force threads dump to be written to the jvm.log file:

kill -3 <pid>

Please collect 3-5 sets of the above data during the hang.

Locate jvm.log file (usually it could be found in the instance log directory):  GF/domains/domain1/logs/jvm.log

You can check the jvm.log file and make sure listed threads are not blocked inside your (web) application classes.

If not - report the problem on glassfish users mailing list or forum, providing as detailed info/observations on the usecase as possible.

Glassfish - Grizzly Notes
http://blogs.sun.com/oleksiys/


Grizzly Option    


-Dcom.sun.enterprise.web.connector.grizzly.enableSnoop=true

[#|2010-05-18T14:45:15.361+0200|INFO|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=31;
_ThreadName=httpSSLWorkerThread-80-3;|SocketChannel headersjava.nio.channels.SocketChannel
[connected local=/192.168.250.27:80 remote=/192.168.250.1:56290] are: === MimeHeaders ===
host = funky.vmdomain.tld
user-agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
accept = text/html,application/xhtml+xml,application/xml;q=0.9,\*/\*;q=0.8
accept-language = en-us,en;q=0.5
accept-encoding = gzip,deflate
accept-charset = ISO-8859-1,utf-8;q=0.7,\*;q=0.7
keep-alive = 115
connection = keep-alive
content-type = text/xml; charset=UTF-8
referer = http://funky.vmdomain.tld/iwc_static/layout/main.html?lang=de&13.01_012515&
content-length = 120
cookie = JSESSIONID=b72180d3f69020df575f8262eed2; form:tree-hi=form:tree:configurations:configuration1:jvmSettings;
         iwc-auth=lang=de:token=RPOcwbWCyk:path=/iwc
pragma = no-cache
cache-control = no-cache
|#]



-Dcom.sun.enterprise.web.connector.grizzly.displayConfiguration=true     

Grizzly 1.0.33-b running on SunOS-5.10 under JDK version: 1.6.0_16-Sun Microsystems Inc.
         port: 1080
         maxThreads: 5
         ByteBuffer size: 8192
         useDirectByteBuffer: 8192
         maxKeepAliveRequests: 256
         keepAliveTimeoutInSeconds: 30
         Static File Cache enabled: false
         Pipeline : com.sun.jbi.httpsoapbc.embedded.LinkedListThrottlePipeline
         Round Robin Selector Algorithm enabled: false
         Round Robin Selector pool size: 0
         Asynchronous Request Processing enabled: true|#]


Further Resources

Tuning the Java Heap
http://docs.sun.com/app/docs/doc/820-4343/abeii?l=en

Glassfish Tuning - HTTP Thread Pool
http://blogs.sun.com/binublog/entry/monitoring_in_glassfish

Measuring HTTP Listener Service Time With BTrace
http://blogs.sun.com/binublog/entry/measure_http_listener_service_time

IWC Performance Tuning
http://wikis.sun.com/display/CommSuite/Convergence+Performance+Tuning


Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Andreas Breuer - TSC Engineer - writes about his life in support.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today