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

stratboy's avatar

How to check Laravel CPU usage in shared host?

Hi, I'm new to Laravel and I'm experiencing a little problem with cpu usage. I just published a very very little and basic test app on a shared hosting. It has nothing more than default installation, except Breeze, spatie/laravel-permission and backpack. Views are defaults. I practically did nothing apart creating a couple of users. The app is installed on a staging subdomain, non google indexed, with almost no usage.

What I'm receiving from my server last days is always the same message:

"You reached limit of 150.0 of total server CPU usage 6 times."

6 times on every mail. Seems like something auto-executing 6 times a day maybe? How can I verify what's the problem? What's causing Laravel consuming so much cpu?

The hosting per se is not too bad, I can host a bunch of custom wordpress websites all running well (I use it for staging). Also, even if it's a shared one, I can have shell/root access.

Ah, I'm using Laravel 8, all latest versions of the added packages.

Thank you

0 likes
3 replies
bugsysha's avatar

Laravel is not the best choice for shared hosting. Laravel doesn't abuse CPU so if it is related to your Laravel site it is caused by your code or some package you are using. You should profile your Laravel app locally with XDebug and figure out if there are any issues.

1 like
martinbean's avatar

@stratboy Shared hosts probably won‘t show you information like that because, like the name says, it’s shared hosting, so resources—such as the CPU—are shared between each customer using that particular server. You’ll just get told when you’re exceeding your quota.

Instead, you’ll need to profile your code as @bugsysha says and see if there are any CPU-intensive parts.

1 like
stratboy's avatar

Thank you all. I love Laravel, I love its community! :)

Please or to participate in this conversation.