If I'm not in the right place to ask this kind of question, please point me in the right direction, I would appreciate it a lot!
I'm hosting a Drupal website on a VPS. Here are the specifications:
The VPS trade name is E3-SSD-2-32 – E3-1225v2 – 32 GB – SoftRaid SSD 3×120 GB. I am not an expert, but here's what I get: 32GB of RAM, that's a lot. And the hard drive is an SSD hard drive, meant to mean fast read and write. Plus, I think it has 3 processor cores, but as I said, I'm crap in hardware …
According to Google Analytics: The website has about 50,000 daily users and between 300 and 500 users navigate at any time.
At certain times of the day (around lunchtime), the server's response time is incredibly slow (up to 20 seconds to display a page), and sometimes the connection times out and Chrome displays the gray error page.
-> Apache2 MaxRequestWorkers
I used Apache2Buddy to help me adjust Apache2 MaxRequestWorkers.
Here is the complete output of Apache2Buddy: https://pastebin.com/PQKrrcCz
Here is my current /etc/apache2/mods-enabled/mpm_prefork.conf:
I've also enabled caching in Drupal to reduce Mysql's load.
Here is the output of htop taken when the website was slow: https://imgur.com/a/gObNfyP
According to htop, the memory usage is 2.75 GB and the processors only use 4%.
What I do not understand, is that Apache2Buddy tells me that Apache uses about 9 GB of RAM while htop indicates that the total use of RAM is 2.75 GB .
When I restart apache with
apachectl restart the website starts working normally … until the next crisis …
Seriously, I'm starting to lose hope here, so any help would be much appreciated …..