Help finding setting for connection timeout

144 views
Skip to first unread message

Tony Shuba

unread,
Feb 14, 2019, 9:53:56 AM2/14/19
to Payara Forum
Hello,

Just hoping someone could point me in the right direction regarding a warning message on our console.  We have a web app with an HTML5 video as background content on one of the page.  We know that we need to optimize and shrink the video file size even further, but what we keep seeing on the console is this when we hit the page:

Warning:   StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
java.io.IOException: Connection is closed
at org.glassfish.grizzly.nio.NIOConnection.assertOpen(NIOConnection.java:441)
at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:663)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:336)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:323)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:154)
at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:2496)
at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:2229)
at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1074)
at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:686)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1628)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:339)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:209)
at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:305)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:251)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:209)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:755)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:575)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:371)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:238)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:516)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:213)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:182)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:156)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:218)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:260)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:177)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:109)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:88)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:524)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:114)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:51)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
at org.glassfish.grizzly.nio.transport.TCPNIOUtils.flushByteBuffer(TCPNIOUtils.java:125)
at org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueWriter.writeCompositeRecord(TCPNIOAsyncQueueWriter.java:165)
at org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueWriter.write0(TCPNIOAsyncQueueWriter.java:68)
at org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.processAsync(AbstractNIOAsyncQueueWriter.java:320)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:84)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:524)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.executeIoEvent(WorkerThreadIOStrategy.java:80)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:66)
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:391)
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:360)
at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:324)
at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:255)
... 3 more

The web page displays fine and the video plays as you'd expect.  I've tried adjusting several settings in the listener, protocol, transport sections on the admin console but nothing seems to help.  I'd love to hear any suggestions as to what settings on the server might help with this.  

Thanks for reading.

Regards,
Tony

Steve Millidge

unread,
Feb 14, 2019, 1:03:03 PM2/14/19
to Payara Forum
I think the exception above occurs when the browser has closed the connection or the connection has been closed at the network layer in the operating system. Perhaps there's a firewall or timeout on the client side. 

Tony Shuba

unread,
Feb 14, 2019, 2:59:20 PM2/14/19
to Payara Forum
Steve,

Thank you for the reply.  I know what you're saying, but I can run scenarios that don't match up to that.

1. I can create a static page with the same video background and launch it from my file system using any browser and it comes up fine.  I see nothing in the browser console related to any timeout or closed connections.  I'm just not convinced it's the browser.

2. I am running this all local on my development machine - not going through any firewall or anything else that would limit the connection on the client side.

My best guess is that it's related to the file size of the media file.  But I can't determine if it's a timeout or a size related setting that's causing this warning exception to be thrown.  As I stated in the original post - the page renders fine.  The video is downloaded and shown in the background of my page.  So it's not really "failing" per se.   

Again, this may not be technically accurate but I feel like it's flowing like this:

- page is requested
- page response is received (but video isn't completely downloaded)
- connection is closed
- video download is then complete

After the video is completely received, it's then trying to complete the request, however that request/connection has already been closed. Thus, the warning.

I was just hoping there was a server setting/timeout/buffer value somewhere that I could extend to give the video more time to download and hopefully fix the issue.  But perhaps I'm way off the mark.
Reply all
Reply to author
Forward
0 new messages