problem with the CPU

Hey
I have a problem, I transferred my WordPress site to GCP and I have a problem that the site is down sometimes, the site with very little traffic (up to 60 users per day) and in any case I notice a CPU utilization of more than 100 percent (photos attached)צילום מסך 2024-04-26 024954.pngצילום מסך 2024-04-26 024901.png

Every time this happens my site is down and the performance drops and then potential customers abandon the site, does anyone know what to do?
I thought maybe it was creamed from the wp-rocket plugin, because it tries to create an automatic cache and therefore the processor is always busy, or maybe it's bot traffic or something else
I would be very happy to receive guidance

3 3 72
3 REPLIES 3

Hello @CFT2063  ,Welcome on Google Cloud Community.

What is your GCE VM configuration ? Maybe server config is to low to handle traffic and any kind of job related with WordPress. 
Maybe your WordPress config or plugins causing this? I would recommend to check if any of your plugin have "kind of schedule" implemented and enabled( maybe WP is doing backup and sending backup file somewhere) and try to have vCPU number higher than actual. 
Did you created WP and SQL at the same instance, or are you using CloudSQL instance for DB and GCE instance for wordpress hosting? 
Regarding WP performance, I've used this [1]article for my WP few time ago.

[1]. https://www.wpbeginner.com/wordpress-performance-speed/

--
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost

Thank you very much for your solution
Regarding "Did you create WP and SQL at the same instance, or are you using CloudSQL instance for DB and GCE instance for wordpress hosting?" - I created an instance and installed bitnami wordpress on it, then I moved my site and pointed the domain to it, I did not install SQL, is it problematic?
And another question, is my problem related to "CPU allocation", I have never changed this setting


@CFT2063 wrote:

I did not install SQL, is it problematic?


I just wanted to know if you have something else on that VM except WordPress installation. If you used [1]this method of deployment, it looks like your VM might be to weak to handle the WordPress, mySQL and so on. Please try to change machine type to bigger one ( I'm assuming that at this moment you have g1-small which is imho to small for WP+SQL+PHP

DamianS_0-1714132046451.png

[1]. https://bitnami.com/stack/wordpress/cloud/google 

 


@CFT2063 wrote:

And another question, is my problem related to "CPU allocation", I have never changed this setting


 

I would say that this is more related with CPU utilization. Imho your VM have only 1vCPU, which can allocate only 1 CPU at max. If you have PHP+MySQL+WP it might be to tight with that setting. 

I would say that if you don't want to deal with VM adjustment and so on, you should think about [2]WP on AppEngine, as AppEngine will be able to scale up/down based on your utilization and requests spikes. 

DamianS_1-1714132389712.png

[2]https://cloud.google.com/wordpress/?hl=en

--
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost