I'm using nginx 1.20.1 on Debian 10, it's working but on command systemctl status nginx
this is shown:
systemd[1]: Starting nginx – high performance web server…
systemd[1]: nginx.service: Can't open PID file /run/nginx.pid (yet?) after start: No such file or d
systemd[1]: Started nginx – high performance web server.
I googled alot and checked permission of related folders of address /var/usr/nginx.pid
and checked the address to be the same in both /etc/nginx/nginx.conf
and /usr/lib/systemd/system/nginx.service
, and good to say that nginx.pid
is created when nginx is running and it is deleted when I stop nginx. I tried using /usr/nginx.pid
in .conf and .service but the same problem exists. In my error.log, no error or warning is logged. Also should mention that it's a fresh VM machine|debian and a fresh nginx! With no extra modification to default nginx.conf !
Question: should I have notice Can't open PID file /run/nginx.pid (yet?) after start: No such file or d
? If it is important how could I resolve it?
Best Answer
When I changed Number of CPUs of my virtual machine form
1
tomore than 1
, the problem solved (more than 2 days engaging). It was not a problem !! it was just a message on the screen 'Can't open PID file` and nothing in the log file and nginx working truely! But this message maybe is a bug according to this refrence : bugs.launchpad.ne