I have October behind the HA-Proxy firewall. When I switched the site into maintenance mode, I received the error 503 instead of the page defined in the settings. Even the backend was not accessible! On the other hand, direct access to the backend server was okay. The issue was somewhere behind the proxy and the backend server.
I found the following reason: HA-Proxy can check the backend servers’ health. In my case, the check was of type ‘html’, which means the proxy periodically made a GET request for the homepage. For some reason, when the backend server was in maintenance mode, the proxy did not receive a response, classified the server as down and sent error 503 to the client.
Pretty strange. How does the redirection in the maintenance mode work? Is there anything that could make the proxy crazy?