How to Fix NGINX error “Failed to read PID from file”

Aug 21, 2019 08:02


It seems to be a race between systemd and nginx. As if systemd was expecting the PID file to be populated before nginx had the time to create it.

mkdir /etc/systemd/system/nginx.service.d printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" > /etc/systemd/system/nginx.service.d/override.conf systemctl daemon-reload systemctl restart nginx

Link: http://alfredoroca.github.io/nginx/2016/09/04/How-to-solve-failure-read-of-nginx-pid-file

Originally published at trichev.com/blog. You can comment here or there.

работа, it, systemd, linux, nginx, work

Previous post Next post
Up