title: Missing error requests in the tomcat's localhost_access log, while IOException during the Jackson invocation appears in the application log
body: <p>Some weird situation. During a performance test of a web application (war), the client gets 500 on about 2% of the requests. When searching the application log, there are some exceptions there:</p>
  
  <pre><code> java.io.IOException: Stream closed
      at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:394)
      at org.apache.catalina.connector.CoyoteReader.read(CoyoteReader.java:110)
      at org.codehaus.jackson.impl.ReaderBasedParserBase.loadMore(ReaderBasedParserBase.java:95)
      at org.codehaus.jackson.impl.ReaderBasedParser._skipWSOrEnd(ReaderBasedParser.java:935)
      at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:245)
      at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2432)
      at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2389)
      at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1618)
      at MyServlet.doPost(MyServlet.java:25)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at MyFilter.doFilter(MyFilter.java:67)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at MyFilter.doFilter(MyFilter.java:28)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
  </code></pre>
  
  <p>However, the localhost_access is empty and all requests there have 200 status code.</p>
  
  <p>I'll appreciate any insights on this problem: </p>
  
  <ul>
  <li>How can happen that localhost_access log is missing 500 requests, while client is getting them. When at all does this happen?</li>
  <li>Why <code>java.io.IOException</code> is thrown only occasionally (less then 2% of requests)?</li>
  </ul>
  
  <p><strong>Update 1:</strong> The problem occurs with Tomcat 7.0.22 and Java 6</p>
  
  <p><strong>Update 2:</strong>
  Here's some sample request to a static html file (not even to a servlet, so there is no exception in log and nothing in localhost_access):</p>
  
  <pre><code>Response headers:
  HTTP/1.1 500 Internal Server Error
  Server: Apache-Coyote/1.1
  Content-Type: text/html;charset=utf-8
  Transfer-Encoding: chunked
  Date: Mon, 02 Apr 2012 07:35:06 GMT
  Connection: close
  </code></pre>
  
  <p><strong>Update 3:</strong> to eliminate the network I ran the same tests on the localhost. It didn't affect the test results. So it isn't the network.</p>
  
  <p><strong>Update 4:</strong> Restarting Tomcat helped. And still I don't understand what caused the original problem.</p>
  
  <p><strong>Update 5:</strong> Tomcat upgraded to 7.0.26, but it didn't solve the problem.</p>
  
  <p><strong>Update 6:</strong> Moved to Jetty. The errors are gone. Should I say "Good Bye" to Tomcat after all these years?</p>