tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kees Jan Koster <>
Subject connection reset errors
Date Tue, 22 May 2012 09:11:45 GMT
Dear Tomcat community,

I am trying to resolve the problem where some client code in Java frequently gets the following
error in the logs: Connection reset

The client code performs a simple HTTP POST request to a Tomcat server (FreeBSD 9.0-STABLE,
Java 1.6.0_03, Tomcat 6.0.26). Below is the HTTP connector from server.xml:

    <Connector port="8080" protocol="HTTP/1.1" 
               connectionTimeout="10000" enableLookups="false" compression="on"
               maxThreads="256" bufferSize="9000" />

Tracing the servlet in Tomcat shows that the servlet's doPost() method returns normally and
does not show any exceptions (I catch and log Throwable and nothing related is logged). Tracing
on an application level shows the posted data to be in the database, as would be for a normal
POST. The data is correct.

Of note is that the response time of the post is the same as for a successful post. Under
normal circumstances Tomcat processes a post in about 25ms, measured in the client. When I
get this exception, the response time is also about that time. I think therefore that I am
not timing out anywhere (or the response time would be a lot longer).

First question: It says "Connection reset" and not "Connection reset by peer". What is the
difference between the two? I am told that one means a local reset and the other means a remote
reset. Where can I find more about this difference?

Second question: how do I analyze such resets? How do I find out who reset the connection
and why? How can I replay this in such a way that I can see that?
Kees Jan

Change is good. Granted, it is good in retrospect, but change is good.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message