Hi,

on my Haproxy instances in HTTP mode, I have some long-lived websocket connections. When doing a reload of Haproxy (e.g. because of a config change), this means that the old process will keep running with the existing websocket connections. The websocket connections can be lasting for a long time (many days). So there can be old Haproxy processes piling up in the meantime, as all these old websocket connections are kept open.

To overcome a possible memory shortage, I have a script to look after the old processes with websocket sessions still running. The script shuts down websocket sessions in the old processes through commands via the master socket. Depending on how many old processes there are, it's taking different action as to when to shut down these old websocket sessions.

One thing I noticed when setting this up is that I cannot use the "shutdown sessions server" command. For instance, if I give the command '@!123456 shutdown sessions server my_websockets/server1', Haproxy will reply "Proxy is disabled."

Instead, I have to send individual commands of the type '@!123456; shutdown session 0xabcdef012345' (with the session ids derived from a '@!123456 show sess' command). This works fine, and after all websocket sessions have been shut down, the old process will exit (and the clients will open up a new websocket connection attached to the current Haproxy process).

Is the "Proxy is disabled." reply the expected response when issuing 'shutdown sessions server' to an old process via the master socket or should Haproxy be able to shut down all of the old sessions for me instead of my script iterating through the list of open sessions? In other words, is this behavior a bug or a feature?

Thanks,
Jens



Reply via email to