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

crazymonster's avatar

Monitor processes and routes

Hi,

I have a project with Laravel 5.3/PHP 7.1 and when the hosting company moved the project on a new LiteSpeed Server, it causes too much CPU usage.

I made a quick check with the followed code to see the active processes: shell_exec("ps -aux | less");

I found processes like this: lsphp:/home/username/public_html/public/index.php"

consume about 25% of the CPU. Of course, they proceed very quickly but when a spike of visits occurred (concurrent requests), the server resources have been exhausted.

As I remembered before, these processes took 5 to 10% of the CPU.

I couldn't handle the reason for that.

I reviewed the MYSQL queries - no issues (made a listener and no slow queries). Also, using caching/optimize commands and so on.

How to see which route has been invoked and standing under: lsphp:/home/username/public_html/public/index.php"

Can I monitor the processes more detailed and how to do it?

0 likes
2 replies
Sinnbeck's avatar

Just curious. What are the specs for the old vs the new server? If the old server had alot more cpu, then it would make sense that it used less cpu (percentage wise) :)

crazymonster's avatar

Yes, that was the first thought but the CPU resource is even higher than previously. In fact, I have problems only with the CPU. And that's odd. I'm going to think it's something about server cache or kind of. Not related to the project. But what could be I have no idea.

Please or to participate in this conversation.