SOLVED: Switched from NGINX proxy to HAProxy on edge firewall and now get intermittent connection errors

Recently, I updated my network, moving HA into a new VLAN, and removed NGINX and SSL add-on’s i used previously, replacing them with HAProxy running on my edge firewall. HAProxy is configured to offload the certificate, and communicate with HA on port 8123.

I’m running pfSense 2.6.0-RELEASE on the firewall, with the haproxy package version 0.61_5.

I made the changes while running HA 2022.03.08.
I am running HA on a HA Blue.

Now when I connect using the local IP and port 8123, everything is running fine.
When I connect to HA with the external IP from my computer, while on the network, i.e. using the NAT reflection on the firewall, the connections fail - sometimes.
Occasionally I get this Screenshot_20220407_122234
and then Screenshot_20220407_122551
it is stuck on this page, and if I force refresh the browser I get this
Screenshot_20220407_123027

It looks like my client fails authentication for some reason, and persistently tries to connect, resulting in the client being added the ip_bans list.
The same occur when using the Android companion app. Even when turning off WiFi and only using mobile data, I get the same issue.

I have also since updated HA to 2022.04.0, but the problem persists.

What is really strange to me, it that the issue is intermittent. It only happens some times.

Anyone have any idea what is causing this?

SOLVED: I had the maximum connections set too low in the HAProxy general settings. I increased the connection count. and now it appears to connect consistently. I leave the question up, in case anyone else run into the issue, and search the forum for a solution.