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

larafam's avatar

cpu spiked on digital ocean ubuntu 5$

I only have one laravel application and my CPU goes 100% when I hit only one request.. my database query only took few ms...

things that I've done:

  • htop / top -c to see which process caused the spike. results- php-fpm: pool

only spike when I have more than 3 queries that only execute few ms sorry for bad English

0 likes
2 replies
bobbybouwmann's avatar
Level 88

Well, this can be a lot of things. It depends on how much data your parse and if you then do stuff with the collection for example. So we need to know more about the code you're performing to help you out here.

1 like
larafam's avatar

@bobbybouwmann just found out the culprit is too many query to fetch many rows from db.. end up doing ajax request to fetch remaining data after page load.. :)

Please or to participate in this conversation.