• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Issue Websites stop working until I restart apache and nginx

Is there a high cpu load when the website goes down? What processes are causing it? Is there a high RAM usage at that time? You can watch the load "live":
Code:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` watch "uptime && echo "\ " && ps aux | sort -nrk 3,3 | head -n 20 && echo "\ " && mysqladmin proc status -u admin"
 
There is no high CPU or memory usage. In fact, when the site goes down, we have to restart the Apache server every time. Until then, the website keeps going up and down intermittently.
 
When the outage occurs, have you tried to restart the PHP-FPM service instead of restarting Apache? If CPU and RAM are good, there is a chance that there is actually no issue with Apache. How do Apache processes behave when an outage occurs? E.g. what is "strace" showing on the processes? Are they actively doing anything? Or are they really dead?
 
No, we have not tried restarting the PHP-FPM service, but it is currently running on the server. How can we determine the actual root cause of this issue? Is it related to PHP-FPM or Apache?
 
What state are Apache (httpd, apache) processes in when Apache seems to be down? Did you try to "strace" any of them? Are they just orphans or are they doing anything? Are they consuming RAM and CPU power? If they are consuming CPU power, what are they doing? Does strace give any clues (mostly it reveals the name of some website(s) that a process is currently handling, e.g. by mentioning file names)?
 
Back
Top