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?
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?