Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IOException: connection reset by peer

10 views
Skip to first unread message

Kirk Everett

unread,
Apr 12, 2002, 4:36:06 PM4/12/02
to
The browser might close/reset the socket when a user initiates a new
request either by clicking on another link, closing the browser, hitting
the stop button, etc... My question is what to do with the
SocketException (shown below) when the servlet/jsp attempts to write to
the outputstream. My current error handling treats this exception as a
critical exception, writes it to are trace file and attempts to forward
to the error page... Should I be explicitly ignoring this exception as
far as my error handling goes? Since this exception can happen through
normal user (i.e. browser) activity, I don't want my trace logs filling
up with thousands of these exception stack traces. How does everyone
else handle this? Is it safe to just ignore any SocketException whose
message is "Connection reset by peer"? Any help would be appreciated.
A stack trace is of an example is included below. I'm on 6.1 SP2.

java.net.SocketException: Connection reset by peer: socket write error]:
java.
net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:83)

at
weblogic.servlet.internal.ChunkUtils.writeHeaderChunk(ChunkUtils.java
:151)
at
weblogic.servlet.internal.ResponseHeaders.writeHeaders(ResponseHeader
s.java:380)
at
weblogic.servlet.internal.ServletResponseImpl.writeHeaders(ServletRes
ponseImpl.java:827)
at
weblogic.servlet.internal.ServletOutputStreamImpl.sendHeaders(Servlet
OutputStreamImpl.java:222)
at
weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:241)
at
weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:
306)
at
weblogic.servlet.internal.MultibyteOutput.write(ChunkOutput.java:413)

at
weblogic.servlet.internal.MultibyteOutput.print(ChunkOutput.java:389)

at
weblogic.servlet.internal.ChunkOutputWrapper.print(ChunkOutputWrapper
.java:134)
at
weblogic.servlet.jsp.JspWriterImpl.print(JspWriterImpl.java:111)
at
weblogic.servlet.jsp.JspWriterImpl.println(JspWriterImpl.java:150)
at jsp_servlet.__error._jspService(__error.java:112)

Mike Reiche

unread,
Apr 15, 2002, 8:36:11 PM4/15/02
to

It's a good idea to log these - you may determine that a particular page is taking
a long time to return and you're losing customers.

There's not much point trying to forward to an error page because the client is
gone.

Mike

>..java:134)

0 new messages