users@glassfish.java.net

Re: "GRIZZLY0023: Interrupting idle Thread" filling log, web apps not responding

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Tue, 03 Apr 2012 18:50:47 +0200

On 04/03/2012 06:12 PM, Bobby Bissett wrote:
>>> Does that "Falling back to Thread Blocking environment" mean that push
>>> isn't available by default in GF 3.1.2? This is starting to seem
>>> vaguely familiar.... Certainly "thread blocking" sounds like something
>>> that could cause a request to take more than 15 minutes. ;)
>> Looks like that. I wonder what's the reason to fallback to
>> thread-blocking...
> Well, maybe it's because our web app was missing the
> <async-supported>true</async-supported> element? Sigh.
>
> Besides adding this in, do I need to do anything else? I've set these
> values to true, but with very brief testing it doesn't appear to make
> a difference:
>
> asadmin set configs.config.server-config.network-config.protocols.protocol.http-listener-2.http.comet-support-enabled=true
> asadmin set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.comet-support-enabled=true
>
> I get a warning and stack trace the 1st time ICEPush tries to update,
> but after that it looks like things are working (though I haven't
> tested fully). The stack trace is below. Can you tell me if anything
> looks familiar there? I know ICEPush != GF, but you know a lot more
> about the Grizzly/web stack than I do. :)
Well, it looks like ICEPush or your app tries to finish Request/Response
processing from the different threads. Normally only one thread may work
with a single Request/Response instance at the same time, and only one
thread has to complete/finish the Request/Response processing.
If you can create a simple testcase, which reproduces the issue - it
would help.

> Also, do I need to enable Comet support or not as written above?
If you don't use Comet and from the stacktraces it looks like you don't
- then there is no need to enable it.

Thanks.

WBR,
Alexey.

>
> Thanks,
> Bobby
>
> [#|2012-04-03T10:14:10.907-0400|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=24;_ThreadName=Thread-2;|StandardWrapperValve[PPCDApplication]:
> PWC1406: Servlet.service() for servlet PPCDApplication threw exception
> java.lang.RuntimeException: java.lang.RuntimeException:
> java.lang.IllegalStateException: Request already released from
> asynchronous mode
> at org.vaadin.artur.icepush.ICEPushServlet.service(ICEPushServlet.java:68)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
> at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
> at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
> at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
> at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
> at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
> at com.sun.grizzly.comet.CometEngine.executeServlet(CometEngine.java:444)
> at com.sun.grizzly.comet.CometEngine.handle(CometEngine.java:308)
> at com.sun.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:87)
> at com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:171)
> at com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:143)
> at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:102)
> at com.sun.grizzly.http.TaskBase.run(TaskBase.java:193)
> at com.sun.grizzly.http.TaskBase.execute(TaskBase.java:175)
> at com.sun.grizzly.arp.DefaultAsyncHandler.handle(DefaultAsyncHandler.java:145)
> at com.sun.grizzly.arp.AsyncProtocolFilter.execute(AsyncProtocolFilter.java:210)
> at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
> at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
> at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
> at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
> at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
> at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
> at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
> at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
> at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.RuntimeException:
> java.lang.IllegalStateException: Request already released from
> asynchronous mode
> at org.icepush.BlockingConnectionServer.respondIfPendingRequest(BlockingConnectionServer.java:133)
> at org.icepush.BlockingConnectionServer.access$700(BlockingConnectionServer.java:41)
> at org.icepush.BlockingConnectionServer$RunningServer.service(BlockingConnectionServer.java:198)
> at org.icepush.BlockingConnectionServer.service(BlockingConnectionServer.java:76)
> at org.icepush.ConfigurationServer.service(ConfigurationServer.java:87)
> at org.icepush.servlet.AsyncAdaptingServlet.service(AsyncAdaptingServlet.java:47)
> at org.icepush.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:51)
> at org.icepush.servlet.PathDispatcher.service(PathDispatcher.java:45)
> at org.icepush.servlet.BrowserDispatcher$BrowserEntry.service(BrowserDispatcher.java:111)
> at org.icepush.servlet.BrowserDispatcher.service(BrowserDispatcher.java:50)
> at org.icepush.servlet.PathDispatcher.service(PathDispatcher.java:45)
> at org.icepush.servlet.MainServlet.service(MainServlet.java:72)
> at org.vaadin.artur.icepush.ICEPushServlet.service(ICEPushServlet.java:62)
> ... 32 more
> Caused by: java.lang.IllegalStateException: Request already released
> from asynchronous mode
> at org.apache.catalina.connector.Request.asyncComplete(Request.java:3986)
> at org.apache.catalina.connector.AsyncContextImpl.complete(AsyncContextImpl.java:242)
> at org.icepush.servlet.AsyncAdaptingServlet$AsyncRequestResponse.respondWith(AsyncAdaptingServlet.java:66)
> at org.icepush.BlockingConnectionServer.respondIfPendingRequest(BlockingConnectionServer.java:131)
> ... 44 more
> |#]