Apache using 100% resources

Hi,

We are experiencing Apache HTTP Server (64 bit) service high CPU usage [100% approx] and Memory usage[90% approx] which raises the overall CPU utilization to 100% constantly after upgrading the CPU and RAM on Windows Server 2019 Virtual Machines. It will even happen right after restarting Apache or rebooting the wamp server.

For some days, every time 300+ users open a website, the Apache CPU usage goes up to 100% and the Wamp server stop automatically (we have to restart it every time it passes).

The Virtual Machines configuration is - Windows Server 2019 Datacenter

Processor : Intel(R) Xeon(R) Platinum 8272CL
CPU : 2.60GHz
RAM : 32GB
mysql version : 8.0.18
Wamp server : 3.2.0
Apache : 2.4.41
PHP : 7.3.12

Please let me know how can I solve this problem?

Thank you.

You might want to configure something like blackfire (Blackfire.io: Continuous Performance Testing) on a staging or local box and simulate load with something like apache bench (ab - Apache HTTP server benchmarking tool - Apache HTTP Server Version 2.4) or siege (GitHub - JoeDog/siege: Siege is an http load tester and benchmarking utility).

Figure out what in your code is causing issues and resolve it. It is almost certainly some blocking IO process like file or db access, but you must isolate the problem somehow first before you can resolve the issue. Short of having a gut instinct or knowing of a specific release the issue started after this is where I would start.

Edit: Do you find it odd that this started right after hardware upgrades (or maybe this is a vps or something idk)?