Respond with errorfile if max_conn reached in backend

You can’t, not without complicated workarounds. Haproxy is not aware of your application status.

There is a similar thread on the mailing list, maybe you can get some input from there:
https://www.mail-archive.com/haproxy@formilux.org/msg26600.html

Maxconn limits the amount of concurrent requests. The amount of not-expired “application” sessions on your backend is unknown.

I know. What i ask is: Ones a user(ip) succesfully conncted to a backend stays there until his ssl-session is expired, other, which run into the connection limit will get another backend, errorfile, etc…
Maybe a stick table or similar…?