Many lsphp7 Processes

#1
I was having a problem with my server constantly crashing, due to running out of memory. I viewed the process list and noticed the number of lsphp7 processes gradually increased over time, with each process using 22M of memory. After many dozen of these processes appeared, the server crashed. Realizing this was probably what was consuming all my memory, I set the "Max Idle Time" to 60 seconds, instead of the default infinite timeout. Now, when I view the process list, I only see a handful of lsphp7 processes, so I think that solved the problem.

My question is, why are these processes appearing in the first place? It seems like they just sit there doing nothing except using memory, so why are they being created? Also, is limiting "Max idle Time" the correct approach to solving this or should I be doing something else? I thought about setting an arbitrary limit of say 40 instances, but in my view, it makes more sense to not limit the instances, but rather to prevent idle instances from hanging out using up memory. Is my thinking correct?
 

Pong

Well-Known Member
Staff member
#2
We are not aware of any bug on the server side for such issue. For the problem from you described, most likely some infinite PHP code issue and keep running if noabort or could be CloudLinux cagefs/LVE make the process hung. "Max Idle Time" for external app is "300" by default if not set, but each php child run as max execution time as you set, should be teminated if it is over the "max_execution_time". still look like some PHP configuration problem to me.
 
Top