Write timeout exceeded when trying to flush the data

1,423 views
Skip to first unread message

Dsv_Isern

unread,
Apr 4, 2017, 9:12:06 AM4/4/17
to Payara Forum
I'm receiving this exception from Payara Server 4.1.1.164 when requesting different web services (Jersey 2.23.1) in a deployed JavaEE Application. I don't know the reason of the exception and either exactly When it appears because in some test environments with the same payara server configuration it turns up but in other never has emerged.
Can Someone help me about what could be the problem here? Any help will be grateful.

[2017-03-22T17:20:03.200+0100] [Payara 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=28 _ThreadName=http-thread-pool::http-listener-1(3)] [timeMillis: 1490199603200] [levelValue: 900] [[
 
StandardWrapperValve[Alexia-BE]: Servlet.service() for servlet Alexia-BE threw exception
java
.io.IOException: Write timeout exceeded when trying to flush the data
 at org
.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:1004)
 at org
.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:715)
 at org
.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:355)
 at org
.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:342)
 at org
.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:161)
 at com
.sun.jersey.spi.container.servlet.WebComponent$Writer.write(WebComponent.java:307)
 at com
.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.write(ContainerResponse.java:135)
 at sun
.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
 at sun
.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
 at sun
.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
 at java
.io.OutputStreamWriter.write(OutputStreamWriter.java:207)
 at java
.io.BufferedWriter.flushBuffer(BufferedWriter.java:129)
 at java
.io.BufferedWriter.write(BufferedWriter.java:230)
 at java
.io.Writer.write(Writer.java:157)
 at com
.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java:190)
 at com
.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeToAsString(AbstractMessageReaderWriterProvider.java:128)
 at com
.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringProvider.java:88)
 at com
.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringProvider.java:58)
 at com
.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:302)
 at com
.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1510)
 at com
.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
 at com
.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
 at com
.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
 at com
.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
 at com
.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1696) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283) at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:466) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:169) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) at java.lang.Thread.run(Thread.java:745) ]]

Randeep Singh

unread,
Jan 12, 2018, 6:12:42 AM1/12/18
to Payara Forum
Hi
I am also facing the same issue.
How did you resolved this error.

Thanks!! In advance.

Ondro Mihályi

unread,
Apr 5, 2018, 9:53:55 AM4/5/18
to Payara Forum
This is often caused by a network with higher latency. This problem is also discussed here: https://stackoverflow.com/questions/43208333/payara-server-write-timeout-exceeded-when-trying-to-flush-the-data#43718253

Try increasing the TCP transport write timeout (In Admin console, go to Network → Transports → TCP and modify Write Timeout). or disable it by setting the value to -1.

Ondro
Reply all
Reply to author
Forward
0 new messages