• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

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