[Date Prev][Date Next] [Chronological] [Thread] [Top]

About to commit removal of global_backendsync code and have one more enhancement

I have one more enhancement I'd like to offer.  This is a simple change
to allow a signal to the slapd process to restart the server using the
same arguments it was called with in the first place.  I use this to
restart the version 1.2.x slapd process in order to get a fresh slapd
running nightly.  There are several reasons for doing this.  For one,
it's a good way to install an upgraded server (as long as you don't need
new command line arguments).  Another reason is to work around memory
leaks.  Better to have the server restart and be out of commission for a
few seconds at 4 AM rather than crash after being up for a few days (and
detect this minutes later).  While it is possible to write a script
which monitors the slapd PID (which I also do to detect crashes)
restarting this way gives the best possible restart time (because
buffers can take a long time to flush).  I am about to code this for
2.x.  Let me know if I can commit these changes to devel.

By the way, the signal I have been using is "SIGQUIT" which was not my
first choice, but SIGUSR1, SIGUSR2, SIGHUP, SIGINT, SIGTERM are all
taken.  So it will be SIGQUIT, unless somebody has a better suggestion.
SIGUSR2 would be a good choice if nobody minds changing the semantics of
that signal.  Currently I think it is the same as HUP, INT, and TERM in
that they all shut down the server.

Actually, this is an enhancement I'm hoping I can do without.  If 2.0.x
doesn't grow the same way that 1.2 has, then I won't need it, but I need
to be prepared.