]> git.evergreen-ils.org Git - working/OpenSRF.git/commit
Perl SIGHUP handling and config reloading
authorBill Erickson <berick@esilibrary.com>
Mon, 15 Oct 2012 21:23:19 +0000 (17:23 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 17 Mar 2013 01:33:47 +0000 (18:33 -0700)
commitdd09c46cfd3bc445a879257bb530117b904f09fa
tree49e25f6da93d6aabc9b10201b6e2672faa90ed93
parent51dfd2c93ded26db5820201a1e43ed8e3cdb7d99
Perl SIGHUP handling and config reloading

Sending the HUP signal to a Perl Listener process now results in the
following:

 * Reload the opensrf_core config
 * re-init the logger
 * kill idle child processes
 * child processes that are active when the signal is received are
   tracked and killed once they become idle.
 * New children are spawned per the min child settings

The primary use case for these changes is temporarily changing the log
level (or log file) for a given service for debug purposes.  It may also
be used, for example, to gracefully recover excess RAM consumed by a
child process.

Not all values in opensrf_core.xml are affected by a SIGHUP.  Since the
goal is a gracful reload, no attempt is made by the listener process to
re-connect to jabber or re-register with the opensrf router(s).  Child
processes will by necessity connect to Jabber during startup, though, so
any changes to the jabber configuration will affect child processes.  In
general, it's best to affect jabber configuration changes with a true
service restart.

opensrf.xml (opensrf.settings config) is not reloaded, so min/max child
settings will not be affected.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
src/perl/lib/OpenSRF/Server.pm
src/perl/lib/OpenSRF/Utils/Logger.pm