Regarding maxconn parameter in backend for connection queueing

If your weblogic logs the users out, when the TCP connection closes, then you can use the configuration I proposed (http-server-close + server maxconn).

When it doesn’t, I don’t see how haproxy would be able to know how many sessions are currently allocated in the backend, so there is no way for haproxy to queue.

No, connection queueing is done in the backend on the server line. When you specify maxconn in frontends or bind lines, the queueing will happen in the kernel (which you only want when haproxy overloaded, NOT in case your backend is overloaded).

[quote=“dvelan, post:7, topic:1320, full:true”]I would like to check when connections in the queue from OS kernel , is there anyway to display user with some custom message? Ex: you are in queue , pls wait.
[/quote]

If the connection is stuck in the kernel queue, by definition the application (haproxy) doesn’t know about it, so it is not possible to emit any errors.

With queueing in haproxy, when timeout queue strikes:
https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4-timeout%20queue

haproxy will send a 503 error, which you can customize:
https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4.2-errorfile