users@glassfish.java.net

Glassfish hanging issues

From: <glassfish_at_javadesktop.org>
Date: Tue, 17 Mar 2009 09:34:37 PDT

This is not really a question, more a return on experience on my usage with Glassfish.

- The application uses JPA, Hibernate, EJB3, JSF 1.2, RichFaces 3.

- The dev platform is WindowsXP, with JDK6u12 and Glassfish v2.1-b60e

- The production platform is a Celeron Dual Core with 2GB ram running Debian4, with JDK6u11, and Glassfish v2ur2-b04 (not easy to use updatetool without a X server...). I tuned it a little (security, autodeploy, logs, nothing serious)
The latter runs on the ports 8080/8181 and is accessible on ports 80/443 thanks to Apache2.2 + mod_jk with ajp 1.3 (really thanks this feature exists).



All went well during the development and test phases
However, I discovered Glassfish would hang badly after just 30 min to 1 hour of usage. There were a few things to notice in the logs:

First this:
[#|2009-03-01T22:59:03.572+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=37;_ThreadName=Timer-0;_RequestID=a440f786-b138-43dc-8391-6a6cd06aab28;|
java.lang.NullPointerException
        at com.sun.jbi.management.system.AutoAdminTask.pollAutoDirectory(AutoAdminTask.java:1031)
        at com.sun.jbi.management.system.AutoAdminTask.performAutoInstall(AutoAdminTask.java:329)
        at com.sun.jbi.management.system.AutoAdminTask.performAutoFunctions(AutoAdminTask.java:288)
        at com.sun.jbi.management.system.AdminService.heartBeat(AdminService.java:966)
        at com.sun.jbi.management.system.AdminService.handleNotification(AdminService.java:197)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor$ListenerWrapper.handleNotification(DefaultMBeanServerInterceptor.java:1732)
        at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:257)
        at javax.management.NotificationBroadcasterSupport$SendNotifJob.run(NotificationBroadcasterSupport.java:322)
        at javax.management.NotificationBroadcasterSupport$1.execute(NotificationBroadcasterSupport.java:307)
        at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:229)
        at javax.management.timer.Timer.sendNotification(Timer.java:1237)
        at javax.management.timer.Timer.notifyAlarmClock(Timer.java:1206)
        at javax.management.timer.TimerAlarmClock.run(Timer.java:1289)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)


Second this:
[#|2009-03-01T23:06:19.992+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=38;_ThreadName=Timer-18;_RequestID=fd2c0521-f530-426a-8645-add9c0ff24cd;|"DPL8011: autodeployment failure while deploying the application : null"|#]


...And the result from the attached file (got using jstack). In other words: threads got blocked.


I dug a bit around and tried most of what people advised on this forum, to no avail. I am not sure the autodeploy errors went out after changing the auto deploy settings in the Glassfish admin or not.

However, in the end, I followed an advice from Jean-François Arcand, that you can find here and there, and switched the ASQuickStartup option to false.
<jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options>

After restart, threads didn't block anymore a single bit and all is smooth.


I have a question eventually: what in my configuration is causing threads to block? Maybe I misconfigured something important?
[Message sent by forum member 'fabmars' (fabmars)]

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