We am running LAMP stack on CentOS 7. Have been fine for about a year.
But today we just saw loading averages
hitting through the roof. We checked top
didn't see any particular process with high load but there were a stream of very many apache processes running.
Tried to restart apache several times but didn't help.
Finally decided to restart MySQL. This briefly brought down the load but not for long.
Then decided to restart the server. This also just briefly brought down the load.
The logs don't show much of external connections:
$ sudo tail -n 500 /var/log/httpd/access_log | cut -d' ' -f1 | sort | uniq -c | sort -gr
395 ::1
101 127.0.0.1
3 66.102.6.91
1 66.102.6.89
What could be going on? How can we fix this?
Edit 1: More details
Load averages are ranging between 50 and 300. At some point we had this:
$ uptime
10:33:28 up 317 days, 22:36, 2 users, load average: 81.21, 75.67, 75.62
Checking later:
$ uptime
12:41:50 up 50 min, 2 users, load average: 227.67, 147.99, 75.37
Following Apache spawning hundreds of processes and pushing up load averages we checked config but didn't see ServerLimit or any of the other parameters:
$ less /etc/httpd/conf/httpd.conf | grep ServerLimit
$