Hi Tim, On Fri, May 21, 2021 at 10:22:15AM +0200, Tim Düsterhus, WoltLab GmbH wrote: > Hi List > > [this email is not subscribed, please keep it in Cc] > > I'd like your advice on a few log entries that confuse me. I am seeing HTTP > 2.0 requests dying with a termination code of 'CC', i.e.: > > > C : the TCP session was unexpectedly aborted by the client. > > C : the proxy was waiting for the CONNECTION to establish on the > > server. The server might at most have noticed a connection > > attempt. > > Thus my understanding is that the client is "simply gone". However HAProxy > *also logs* a HTTP status of 503 with 0 bytes sent to the client. > > For requests that never even established a connection to the server and that > were aborted by the client I would not have expected any status code to be > logged at all, after all the server could not generate one and there is no > client that would be able to receive it.
I'd say "it depends". If a connection attempt was made, and your servers are flooded with aborted connections coming from haproxy, I'm pretty sure you'll come here and ask why haproxy doesn't produce a log that permits to identify the client and frontend involved in this. The 503 is just a byproduct of the aborted connection. That can sound strange but what happens here is that the status was set after it was noticed the processing ended without being able to connect to any server. I agree that a 4xx would be more suitable here, and this problem was already raised in the past regarding the fact that *certain* aborts or errors need closer inspection to figure where the problem was. We've already noted that significant improvements in close/abort need to be made to 1) process them better and 2) report them more accurately. This is a tedious task which *will* inevitably cause regressions, but it's the price to pay to improve that. For the time being, status codes are here for a reason and are more accurate than a status code (status which could also come from a server by the way). There used to be some corner cases of combined client+server errors reporting server errors, but these faded away with the muxes and I don't think there are still any (or only in tricky cases). Thus I'd encourage you to check the termination flags to be certain. Hoping this helps, Willy

