Hello Marco, On Tue, Oct 01, 2019 at 10:46:31AM +0200, Marco Colli wrote: > However the problem is that **a few hundreds connections remain open from > HAProxy to the Puma web servers forever**. That slow down HAProxy. > > When we restart HAProxy then everything works fine again and the number of > backend connections drops to zero, which is the normal value since we use > option http-server-close.
That's very interesting to know that connections remain up despite http-server-close! This is totally unexpected. I could suspect an absurd sequence such as a server to closing by itself and haproxy thinking it's closing, with nobody taking care of closing the connection before dropping it. If you could issue a "show fd" on the CLI and spot a few of these connections, that would help, we could see how they are possibly attached to anything and in what state they are. Note, it's not normal either that anything would slow down just for a few hundreds connections. Is your haproxy process looping at 100% CPU maybe ? We could imagine that it's woken up in loops reporting these connections and nobody handles them maybe :-/ Thanks, Willy