Hi,
When HAProxy is shut down gracefully, my understanding is that it waits
for all open connections to be closed before it will terminate. However,
if the connections don't ever close then HAProxy may never shut down (or
perhaps it takes a very long time, I'm not sure). This is mainly a
problem with long-lived connections that remain continuously active, so
timeouts won't trigger either.
Is there a way to configure HAProxy to have a maximum graceful shutdown
time? For example it would stop listening for new connections
immediately, and then after a specified amount of time it would close
all connections and terminate, regardless of what kind of activity might
be going on within those connections.
Otherwise my plan is to create a cron job that kills old haproxy
processes on a delay. Would be nice if there were a better option
though.
Thanks for any suggestion.
Justin
When HAProxy is shut down gracefully, my understanding is that it waits
for all open connections to be closed before it will terminate. However,
if the connections don't ever close then HAProxy may never shut down (or
perhaps it takes a very long time, I'm not sure). This is mainly a
problem with long-lived connections that remain continuously active, so
timeouts won't trigger either.
Is there a way to configure HAProxy to have a maximum graceful shutdown
time? For example it would stop listening for new connections
immediately, and then after a specified amount of time it would close
all connections and terminate, regardless of what kind of activity might
be going on within those connections.
Otherwise my plan is to create a cron job that kills old haproxy
processes on a delay. Would be nice if there were a better option
though.
Thanks for any suggestion.
Justin