killing persisent conections on backends marked down?

From: Greg Gard <ggard#carepaths.com>
Date: Thu, 25 Feb 2010 16:27:28 -0500


hi willy and friends,

i am working on a set of ruby scripts to do database failover and stonith. so far all is working pretty well, but i have a few issues:

  1. rails makes persistent connections to the backend database so when a server is marked down, the connection remains ongoing. currently, i deal with this by issuing a "stonith" command in my ruby "driver" script for haproxy that shuts the backend down explicitly via ssh, but it would be nice if i could rely on haproxy to kill the connection explicitly. is there a setting to make haproxy kill existing connections on a backend going down?
  2. for rails i have tcp timeout set to 0 so it seems to be handling the persistent connections ok, but when i do a reload using the haproxy init script in the debian packages, i end up with two haproxy backends as the persistent connections aren't killed. essentially the original process is waiting for the connections to end before it kills itself, but that will never happen with rails db connection. any ideas or suggestions?

ps: having rails not use persistent connections is not really what i would like to do right now. i have run that in the past on production and had wierd timeout problems and choppy connectivity.

thanks...gg

-- 
greg gard, psyd
www.carepaths.com
Received on 2010/02/25 22:27

This archive was generated by hypermail 2.2.0 : 2010/02/25 22:45 CET