Auto-closing long running connections

Hi all,
We had an incidence lately where the maxconn of a frontend was reached by mainly http persistent connections. New connections were queued and eventually dropped. We think most http persistent connection were sort of idle and that is ok under normal circumstances but not during traffic spikes.
Is there a way to restrict the persistent connections in a way that when the frontend is operating at ~max capacity that they are dropped and no new persistent connection is accepted until the frontend is down to ~70% capacity again.
Thanks!
Jonas

No, I’m not aware of any such features.

What you need is to properly configure maxconn and timeouts. If you want help with that, share configuration, output of haproxy -vv and amount of RAM available.