Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Kingo4luv's avatar

MYSQL TAKES UP 200+% OF MY CPU

Hello I need help.. I am using 8gb ram and 25gb disk droplet on digital ocean.. But currently MySQL take up 200+% of my CPU hence making the website slow.. I usually have more than 20k views daily. Is there any I can optimize the server and reduce the MySQL CPU usage?

0 likes
2 replies
ederson's avatar

The first thing that comes to mind (and probably you ve done this already) is caching to reduces the requests to the db

1 like
Snapey's avatar

Check for n+1 issues

Check the timing of each query to see if you need to add indexes

You can and should do both of these locally with Laravel Debugbar

1 like

Please or to participate in this conversation.