users@glassfish.java.net

Re: glassfish hangs and stops accepting connections

From: <glassfish_at_javadesktop.org>
Date: Fri, 23 Jul 2010 04:57:51 PDT

> I've had a similar problem you are describing. The
> problem gone away after reading the following links:
> http://jfarcand.wordpress.com/2007/01/03/configuring-grizzly-for-performance-part-i-jvm-options/
> http://jfarcand.wordpress.com/2007/03/12/configuring-grizzly-for-performance-part-ii-setting-the-proper-values-in-domain-xml/

We have exactly the same problems, I've tried the tuning options in the links above for a couple of months, but the problem persist.
I'll try the timeout setting next; com.sun.enterprise.web.connector.grizzly.readTimeout=5000
We can't update to glassfish v3 just yet, so that's not an option for us at this time.

Version info:
Gentoo 64bit: linux kernel 2.6.31-gentoo-r6
Sun GlassFish Enterprise Server v2.1.1 ((v2.1 Patch06)(9.1_02 Patch12)) (build b31g-fcs)
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
running in a VMWare vSphere environment.

The server usually begins to consume cpu before the https-hang, and, using jconsole with top-threads plugin: http://lsd.luminis.nl/top-threads-plugin-for-jconsole/ I see a httpSSLWorkerThread-443 using 100% cpu that has the following stack:


sun.nio.ch.EPollArrayWrapper.epollCtl(Native Method)
sun.nio.ch.EPollArrayWrapper.updateRegistrations(EPollArrayWrapper.java:246)
sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:209)
sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:65)
sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
-> seems to be from here and up the busy-loop is running <-
com.sun.enterprise.web.connector.grizzly.ssl.SSLUtils.doRead(SSLUtils.java:137)
com.sun.enterprise.web.connector.grizzly.ssl.SSLByteBufferInputStream.doRead(SSLByteBufferInputStream.java:71)
com.sun.enterprise.web.connector.grizzly.ByteBufferInputStream.read(ByteBufferInputStream.java:167)
org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:747)
org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:418)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.parseRequest(DefaultProcessorTask.java:731)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:593)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:444)
com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:230)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
[Message sent by forum member 'hakoni']

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