|
From: Johannes Z. <jz...@10...> - 2007-09-11 08:56:55
|
Thanks for your answer so far. Turns out that the timeout is just a rare exception compared to the other eof's that arises (we did'nt noticed them because of another bug, since the message of the eofs was null). We're getting a -------- org.mortbay.jetty.EofException at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:760) at org.mortbay.jetty.AbstractGenerator$Output.blockForOutput(AbstractGenerator.java:546) at org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:567) at org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:907) at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:632) at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:575) ... Caused by: java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcher.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:29) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104) at sun.nio.ch.IOUtil.write(IOUtil.java:60) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302) at org.mortbay.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:166) at org.mortbay.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:208) at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:693) -------- every now and then in cases we're writing a resource (image) to the response stream. (its not easily reproducable but in production system it happens every minute - on different resources) After reading http://servlets.com/archive/servlet/BrowseList?listName=jetty-discuss&by=thread&from=80060&to=80060&first=1&count=7 i removed all closings of the response stream out of our code. With the effect that now we getting -------- org.mortbay.jetty.EofException at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:760) at org.mortbay.jetty.AbstractGenerator$Output.blockForOutput(AbstractGenerator.java:546) at org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:567) at org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:907) at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:628) at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:575) at com.IOItec.sproose.util.IoUtil.copyContent(IoUtil.java:49) ... Caused by: java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcher.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:29) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104) at sun.nio.ch.IOUtil.write(IOUtil.java:60) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302) at org.mortbay.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:166) at org.mortbay.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:208) at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:693) -------- most of the time. Reading this http://www.servlets.com/archive/servlet/ReadMsg?msgId=538916&listName=jetty-support gives me the idea that these exception are some kind of usual and a webapp should not handle them, jetty will care about it. But passing these exceptions through the whole webapp and not catching them is somekind of difficult in our case. So question is, does it make any difference if we just catch these exceptions and swallow them by ourself ? best regards Johannes Greg Wilkins wrote: > Johannes, > > this exception is thrown when a response stream is blocked for more that maxIdleTimeMs > > You should be able to reproduce it by having a client that starts reading a large image > and then is blocked (ie suspened) for 30 seconds or so (depends on your config). > > Of course this could be your network rather than your client getting blocked.... > > or it could be a bug in Jetty detecting this condition when it should not :-) > but you will need to provide more info before I suspect a bug (like it takes > less than the timeout to produce this exception). > > cheers > > > > > > Johannes Zillmann wrote: > >> Hi jetty community, >> >> we have problems with following exception: >> >> org.mortbay.jetty.EofException: timeout >> at org.mortbay.jetty.AbstractGenerator$Output.blockForOutput(AbstractGenerator.java:543) >> at org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:567) >> at org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:907) >> at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:628) >> at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:575) >> at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105) >> >> while writing resource like jpgs to the response outputstream. >> This happens every now and then in a production system but we can not reproduce this. >> Does this happen if a client cancel a connection prematurely ? >> >> regards >> Johannes >> >> PS: thanks for that great product ! >> >> >> >> >> >> > > > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 101tec GmbH Halle (Saale), Saxony-Anhalt, Germany http://www.101tec.com |