I am encountering this following exception on our production setup. Below is the trace,
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:189)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:532)
at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:501)
at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:563)
at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:124)
at org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:346)
at org.apache.coyote.Request.doRead(Request.java:422)
at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:290)
at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:431)
at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:315)
at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:200)
at java.nio.channels.Channels$ReadableByteChannelImpl.read(Channels.java:385)
Below are the configuration details for tomcat.
- Connector - BIO
- Max threads - 100
- Accept Count - 20000
Most common case i have come across the web is the client closing out on the connection before the server responds back. However this does not seem to be the case here. I just want to try to understand why this is happening. Have been try to reproduce this at my end without much luck.
Couple of things already tried,
- Set a break point in the server code, hit from the client, waited for a min (> 20000) and then ran it to completion. No error here.
- Set a break point in the server code. Hit from the client code, it stopped at the server break point, then i stopped/closed the client and let the server code run to completion, this too didn't result in any errors.
Any ideas on how do i reproduce this problem at my end locally.
Thanks,
Vicky