Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them, it only takes a minute:

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

share|improve this question
    
are the clients (in respect to the server) behind firewalls , switches, routers etc? – MaVRoSCy Jun 5 '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. – Vicky Jun 5 '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? – mass Mar 29 at 21:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.