This may be a viable workaround.

For a systemd Type=fork unit 'success' is determined when the parent
process exits. At this time systemd expects the PIDFile to exist. nginx
actually creates the PID file in the forked process.

Presumably on single CPU systems there is a sufficient delay in
scheduling for the forked process not to have created the PID file when
systemd checks for it.

Bring the creation of the PID file forward into the parent process.

** Patch added: "Bring PID creation into parent process"
   
https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1581864/+attachment/5268127/+files/nginx-pid-race.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864

Title:
  nginx.service: Failed to read PID from file /run/nginx.pid: Invalid
  argument

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1581864/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to