httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reindl Harald <h.rei...@thelounge.net>
Subject Re: httpd + systemd
Date Fri, 26 Feb 2016 16:16:10 GMT


Am 26.02.2016 um 17:11 schrieb Tim Bannister:
> On 26 February 2016, Reindl Harald wrote:
>>
>>
>>
>> in case of a SIGTERM the daemon is supposed to do a clean shutdown
>> anyways
>>
>> [Service]
>> Type=simple
>> EnvironmentFile=-/etc/sysconfig/httpd
>> ExecStart=/usr/sbin/httpd $OPTIONS -D FOREGROUND
>> ExecReload=/usr/sbin/httpd $OPTIONS -k graceful
>> Restart=always
>> RestartSec=1
>>
> Maybe add an ExecStop as well which calls graceful-stop? This is more reliable than a
signal.
>
> After DefaultTimeoutStopSec seconds, systemd will intervene regardless

it works not the way you likely think and may make things worser than a 
controlled SIGTERM

https://www.freedesktop.org/software/systemd/man/systemd.service.html

Note that it is usually not sufficient to specify a command for this 
setting that only asks the service to terminate (for example, by queuing 
some form of termination signal for it), but does not wait for it to do 
so. Since the remaining processes of the services are killed using 
SIGKILL immediately after the command exited, this would not result in a 
clean stop. The specified command should hence be a synchronous 
operation, not an asynchronous one.


Mime
View raw message