[PATCH] Workaround for systemd error messages about nginx pid file.
gmm at csdoc.com
Wed Nov 29 13:30:04 UTC 2017
On 29.11.2017 14:30, Maxim Dounin wrote:
> No, thanks. As a systemd-specific workaround this definitely
> should be in the service unit file instead, if at all. Moreover, as
> previously explained, the message in question is harmless and the
> workaround is not needed for anything but silencing the message.
These messages in question are harmless only if race condition occurs.
There are cases when these systemd messages talk about real problems,
for example, if user add to config pid directive with different
from unit-file pidfile location, or if nginx compiled with
different --pid-path= configure argument. For example:
In unit-file: PIDFile=/var/run/nginx.pid
in nginx config: pid /different/path/to/nginx.pid;
or in binary: --pid-path=/usr/local/nginx/logs/nginx.pid
The main purpose of my patch is to suppress harmless systemd messages
and leave alone all systemd messages which are indicates real problems.
nginx service unit file is not very good location for this workaround,
because there are many different linux distros and unit file sources,
not all nginx users use official packages from nginx.org site.
More information about the nginx-devel