codership / glb

Galera Load Balancer - a simple TCP connection proxy and load-balancing library
GNU General Public License v2.0
153 stars 51 forks source link

watchdog processes don't get cleaned up #5

Open bjorgensen1 opened 10 years ago

bjorgensen1 commented 10 years ago

I have been doing some testing on my servers with glbd and I have noticed that the watchdog processes apparently don't get cleaned up when glbd stops. I have been frequently restarting glbd intentionally and unintentionally and I currently have 378 watchdog processes running. The old processes aren't taking a significant number cpu cycles, however, since from what I can tell it is just sitting in a loop waiting for the main glbd process to tell it to "poll".

If I run glbd NOT with the --daemon switch, the children do get stopped. With verbose mode on, there are messages that confirm that the children are stopped, however, it appears that while running with --daemon verbose mode is always disabled so I can't see what happens at that point.

The processes should be cleaned up when glbd stops.

I am running glbd 1.0.1 on RHEL 6.5. You should be able to see the processes building up by starting and stopping glbd several times with the watchdog configured and checking the count of watchdog processes with "ps -A | grep mysql.sh | wc -l"

troex commented 9 years ago

I had the same issue, lt happened sometimes, sometimes not. I've added a silly patch to ensure it always terminate watchdog exec script, this can produce additional warnings in verbose mode but still working and cleaning up – https://github.com/troex/glb/blob/debian/debian/patches/0001-ensure-wdog-termination.patch