PHP: What is lsphp? [closed]
Asked Answered
S

1

6

Our website is currently having problems and produces errors 507 and 508 (Resource Limit is Reached). I checked cPanel and saw that we've reached the number of Entry Processes available to us and we are at 98% CPU usage.

So, I checked SSH to see what processes are running and saw multiple lsphp processes that are running. I tried various ways getting more information about the process, but it is not returning anything.

I want to understand what lsphp does. I searched for it already but it is still not clear to me.

Shechem answered 19/8, 2020 at 23:2 Comment(3)
lsphp is lightspeed. If you have a large scale program built, you may need to dedicate more cores to your machine.Cheiron
With that said .. If you have a php app that isn't functioning (trash collecting) properly -- That could be an issue .. Opcache is also your friend. You can test this by kill -9 pid command and see if it alleviates your CPU draw.Cheiron
In case you are running an older php version - consider upgrading. The performance-gap between 5 and 7 is huge!Cesarean
S
14

PHP needs to communicate with the WebServer (apache, nginx, litespeed or any other) in a format which both parties can understand. For example a common way of integrating apache with PHP is by using "mod-php" for apache. nginx usually is integrated using "php-fpm" which is a modern way of "cgi" interface (basically informations are shared over a port or socket). litespeed server which most likely you have installed on your machine communicates using a special "api" (application programming interface) called lsphp (https://www.php.net/manual/de/install.unix.litespeed.php). So if you are using apache or nginx then most likely there is something wrong that lsphp processes are running but if you have LiteSpeed Web Server or OpenLiteSpeed Web Server then it is more than normal.

Most likely the problem with resources is not due to the processes, but due to what they do. Have you checked the logs of your webserver for unusual behavior? For example maybe you are being DDoSed by a bot and simply numerous instances of PHP are fired to handle the traffic.

Sinnard answered 19/8, 2020 at 23:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.