Hello!
On Thu, Dec 11, 2014 at 10:47 AM, Matthieu Labour wrote:
> I am getting the following error
>
> ubuntu@ip-XXX-XXX-XXX-XXX:~$ sudo /usr/local/openresty/nginx/sbin/nginx -s
> reload
> nginx: [error] invalid PID number "" in "/var/run/nginx.pid"
>
Seems like the /var/run/nginx.pid file is overwritten by something
else? You can cat this .pid file to see its content. It's most likely
that you have some other random processes updating this .pid file for
some reason.
BTW, -s reload is not recommended to control nginx on *NIX systems.
It's much better and efficient to directly send the HUP signal to the
nginx master process. See
http://nginx.org/en/docs/control.html
Regards,
-agentzh