[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jetty-users] blocked in SocketOutputStream.write()
|
Hello, I am using Jetty 6.1.22.
I am hitting an issue where the client has the stream open, but is not
reading from it. This causes the server to block in
SocketOutputStream.write() forever, with the following stacktrace:
at java.net.SocketOutputStream.socketWrite0(SocketOutputStream.java:-1)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:295)
at com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:284)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:734)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:722)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
at org.mortbay.io.ByteArrayBuffer.writeTo(ByteArrayBuffer.java:368)
at org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:122)
at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:721)
at org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:568)
at org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:1005)
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:648)
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:579)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:263)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
at java.io.OutputStreamWriter.write(OutputStreamWriter.java:190)
at java.io.BufferedWriter.write(BufferedWriter.java:170)
Is there anyway to be defensive about this on the server side, and
timeout the stream? Using NIO is not an option.
Thank you.