I have an issue I am not sure how to troubleshoot. My setup:
proxy_pass
in virtual host files)The Issue:
Every few days it seems like NGINX stops working. I can tell because I am unable to access the Wordpress site until I run sudo service nginx restart
. It does not seem to be a PHP issue, since if I restart PHP the Wordpress site DOES NOT go back online until the NGINX restart. The server logs in /var/log/nginx
don't seem to give any insight, and I am unsure how to troubleshoot the issue.
Any ideas on where to start? Any monitoring I can set up (apart form just a basic "site down") that might provide insight? Maybe there is some setting that I can toggle in NGINX that handles overuse (if that is the issue)?
I encountered a similar issue when using nginx with certbot. I am hosting under Ubuntu 16.04 LTS and certbot is quite outdated (0.10.2).
As described here this version of certbot suffers an issue when emiting a certificate. The standard commands don't works, specific commands must be used.
Certbot comes with an auto updater that will renew certificates automatically. This updater fails to use the workaround and also fails to start the nginx service after operations.
What I did is to disable this service. There is a file at /etc/systemd/system/timers.target.wants/certbot.timer
. Edit this file and comment the lines that enable the timer.
[Unit]
Description=Run certbot twice daily
[Timer]
OnCalendar=*-*-* 00,12:00:00
Persistent=true
#[Install]
#WantedBy=timers.target
Now you will have to renew the certificates manually.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With