1

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.

  1. Connector - BIO
  2. Max threads - 100
  3. 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,

  1. 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.
  2. 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

Victor
  • 1,207
  • 2
  • 13
  • 21
  • are the clients (in respect to the server) behind firewalls , switches, routers etc? – MaVRoSCy Jun 05 '13 at 10:02
  • @MaVRoSCy - The one i am trying to reproduce locally, both client and server at localhost. However on production, the application is load balanced and gets hits from external clients. – Victor Jun 05 '13 at 10:13
  • Im having the same problem and i think whatever is in front of tomcat(load balancer etc) is dropping some of the excessive connections under heavy load(higher than it can handle). Were you able to identify the cause? – Kerem Mar 29 '15 at 21:12
  • Hi .. I am facing the same issue in our application during heavy load on production .. Any imputs will be much appreciated .. thanks. @Vicky – Krithika Vittal May 28 '18 at 20:24

0 Answers0