EDIT:
I have determined that I have a configuration problem and my ignorance is the problem. I have php-fpm processes that are eating up all of the ram and cpu of my server. I decided to max out a vps instance to verify this. It's not an attack or lack of resources. It is pure ignorance of php-fpm and how it operates. I am looking to learn here. I just want my miserable experience to benefit another person lol.
It's a wordpress site there are php-fpm processes that are getting stuck running and are eating up 100% of the CPU and memory. I use W3 cache and a plugin that uses .htaccess rewrite rules to hide/mask the wordpress directories. Here is what I see:
curl http://127.0.0.1/fpm-status?full
Result: (one of many)
pid: 23050
state: Running
start time: 27/Dec/2022:08:23:00 +0000
start since: 7703
requests: 73
request duration: 14958380
request method: GET
request URI: /index.php?wph-throw-404
content length: 0
user: -
script: /opt/bitnami/wordpress/index.php
last request cpu: 0.00
last request memory: 0
I checked for the possible ddos stuff using:
netstat -ntu|awk '{print $5}'|cut -d: -f1 -s|sort|uniq -c|sort -nk1 -r
Results:
57 127.0.0.1
48 [server ip]
1 52.95.24.108
1 40.88.35.229
1 101.227.24.18
Nothing crazy
tail -n 10000 /opt/bitnami/apache2/logs/access_log | awk '{print $1}'| sort| uniq -c| sort -nr| head -n 10
Output:
7957 [server ip]
1361 [my ip]
368 5.161.83.61
65 127.0.0.1
28 [web app]
17 66.249.69.248
16 65.108.154.199
15 5.45.207.151 <-Russia
10 183.136.225.32 <-China
7 66.249.66.82
What I don't get is why these processes don't expire or get killed. I'm not really savvy when it comes to php-fpm so I'm hoping someone here might be able to help me figure this out. It has to be a PHP-FPM config setting or something. I've almost pulled all my hair out. Help is greatly appreciated :)