• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Nginx crashes at the same time every day (after I receive an email about application updates

fuf

New Pleskian
I'm new to Plesk (and server admin in general) so please excuse what may be a simple issue.

This has happened the last four days in a row:
* At 06:29 I get an email from my Plesk server with the subject "Application Updates." It only lists one plugin update for a WordPress site, even though when I check the WP toolkit there are other plugin updates on other WP sites
* Immediately after (also at 06:29) I get a string of emails from uptimerobot.com saying that the sites hosted on the Plesk server are no longer accessible.
* All sites return a 502 error
* The Plesk admin still works
* I can fix the sites by running:
# /usr/local/psa/admin/bin/nginxmng --disable
# /usr/local/psa/admin/bin/nginxmng --enable

It seems as though the Plesk scheduled task that checks for application updates (and does other stuff?) is causing nginx to stop working.

Any ideas on how to start fixing?

Bonus question: can I change the time that this scheduled task takes place so that I'm more likely to be awake and at my desk if something goes wrong?

Many thanks.
 
Thanks Julian.

I ran those two commands.

I guess we'll see tomorrow morning if that made any difference. :)
 
Hi fuf,

i doubt that the suggestions from @Julian Johannsen may solve your issue(s), because all point to a well known "logrotate" - issue, where your apache webserver crashes, due to several ( instant processing ) "reloads", which can result in left-over pid-files, when watchdog for example noticed a non-working apache - webserver and tries to restart the service, which makes it impossible to automatically restart your apache - webserver.

Pls. consider to change => "/etc/logrotate.d/apache2" ( for Debian/Ubuntu - based systems ) from:

Code:
...
    postrotate
                if /etc/init.d/apache2 status > /dev/null ; then \
                    /etc/init.d/apache2 reload > /dev/null; \
                fi;
...

to:
Code:
...
    postrotate
                if /etc/init.d/apache2 status > /dev/null ; then \
                    /etc/init.d/apache2 restart > /dev/null; \
                fi;
...


In addition, consider as well to change at "/etc/logrotate.d/mod_security" ( for Debian/Ubuntu - based systems ) from:

Code:
...
    postrotate
        /etc/init.d/apache2 reload > /dev/null 2>/dev/null || true
...

to:
Code:
...
    postrotate
        /etc/init.d/apache2 restart > /dev/null 2>/dev/null || true
...


It could be as well a good idea to increase the log - level for apache and nginx ( to "debug" - log - level ), to be able to investigate the issue far better.
Pls. don't try to compair a "working" Plesk Control Panel with this issue, because Plesk uses it's very own webserver ( => sw-cp-server )
 
Last edited by a moderator:
Thanks UFHH01 :)

I've made your suggested changes to /etc/logrotate.d/apache2 and /etc/logrotate.d/mod_security

We'll see what happens tomorrow.
 
Back
Top