Ralf Hildebrandt
2010-Jan-21 14:35 UTC
[Dovecot] Fastest restart of dovecot after upgrade: HOW?:
I'm running dovecot under runit: #!/bin/sh echo '/var/core/%p' > /proc/sys/kernel/core_pattern ulimit -n 8096 ulimit -c unlimited exec /usr/local/sbin/dovecot -F (that way, together with incron, I can automatically generate the coredumps I'm posting all the time) If I apply a patch and recompile, what is the fastest way of restarting dovecot? Which part of the process structure can be killed and takes all it's children with it? ??runsvdir???runsv???ntpd ? ??runsv???dovecot???2*[dovecot-auth] ? ? ? ??1203*[imap] ? ? ? ??64*[imap-login] ? ? ? ??64*[managesieve-log] ? ? ? ??64*[pop3-login] ? ? ??svlogd killall dovecot? Is that guaranteed to wipe out ALL child processes as well? I had to use (at least in the past): sv d /var/service/dovecot killall dovecot killall -9 imap-login ps auxwww|grep dovecot to make sure everything would be dead... -- Ralf Hildebrandt Gesch?ftsbereich IT | Abteilung Netzwerk Charit? - Universit?tsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt at charite.de | http://www.charite.de
Timo Sirainen
2010-Jan-21 14:39 UTC
[Dovecot] Fastest restart of dovecot after upgrade: HOW?:
On 21.1.2010, at 16.35, Ralf Hildebrandt wrote:> Which part of the process structure can be killed and takes all it's > children with it? > > ??runsvdir???runsv???ntpd > ? ??runsv???dovecot???2*[dovecot-auth] > ? ? ? ??1203*[imap] > ? ? ? ??64*[imap-login] > ? ? ? ??64*[managesieve-log] > ? ? ? ??64*[pop3-login] > ? ? ??svlogd > > killall dovecot? > Is that guaranteed to wipe out ALL child processes as well?If you set shutdown_clients=yes. Although even with =no it should stop listening.> I had to use (at least in the past): > > sv d /var/service/dovecot > killall dovecot > killall -9 imap-login > ps auxwww|grep dovecot > > to make sure everything would be dead...I guess there can be bugs.. But in general the processes should notice immediately that master died, and immediately close their listeners and optionally shut down.