jetty.project icon indicating copy to clipboard operation
jetty.project copied to clipboard

Excessive logging on unconsumed request content

Open bjorncs opened this issue 6 months ago • 0 comments
trafficstars

Jetty version(s) 12.0.19

Jetty Environment core

Java version/vendor (use: java -version) 17.0.13

OS type/version AlmaLinux 8

Description We have observed multiple log entries from org.eclipse.jetty.server.Response.writeError() in situations when HTTP/2 load exceeds service capacity. We believe this occur on requests where maxUnconsumedRequestContentReads is exceeded, when a response is returned prior to fully consuming the response content, as explained in https://github.com/jetty/jetty.project/issues/12079#issuecomment-2298427424.

What's not expected is the attempt of writing a 500 response. This is triggered after a handler writes a response, so I don't expect this event to trigger a code path that tries to write another one. Each failed attempt/request leads to a 'warn' log record.

org.eclipse.jetty.server.Response	warning writeError: status=500, message=org.eclipse.jetty.util.StaticException: Unconsumed request content, response=ErrorResponse@5c3b0f0d{500,PUT@142348d4 https://domain/path?q=val HTTP/2.0}

How to reproduce?

  • High HTTP/2 load with POST/PUT/PATCH requests with large content.
  • Handler that returns response immediately without consuming content.

bjorncs avatar May 20 '25 09:05 bjorncs