Reached max children process limit

semprot

Well-Known Member
#1
I got this error few times every week / every 2 or 3 days.

Code:
2017-05-22 18:21:53.579 [STDERR] Reached max children process limit: 240, extra: 1000, current: 1240, please increase LSAPI_CHILDREN.
So i increased external app >> lsphp7 >> max connections from 120 to 360.

Then i still have this new error
Code:
2017-05-23 04:12:04.801 [STDERR] Reached max children process limit: 720, extra: 1000, current: 1720, please increase LSAPI_CHILDREN.
Do i still need to keep increasing the number until the error is gone?
 

semprot

Well-Known Member
#3
you can try to increase if your server can sustain with that.

does it happen during high traffic time ?
is it possible DDos ?
Based from the time, i don't think it's on high traffic time. It is on normal traffic.
I am not sure whether that is a DDOS or not.
 

semprot

Well-Known Member
#5
how often does your lsws restart ? also every 2 or 3 days 1 time ?
Here is information from my stderr.log.
Oldest line in the log is 2017-05-16.
  • 7 Lines : 2017-05-19 07:07:XX
    Then :
    2017-05-19 07:07:27.605 [STDERR] Child process with pid: 28627 was killed by signal: 6, core dump: 128
    2017-05-19 07:16:04.754 [STDERR] Child process with pid: 44294 was killed by signal: 11, core dump: 128
  • 119 Lines : 2017-05-19 08:04:XX
    Then :
    2017-05-19 08:04:21.762 [STDERR] Child process with pid: 116043 was killed by signal: 11, core dump: 128
  • 711 Lines : 2017-05-22 18:20 ~ 18:21
    Then :
    2017-05-22 18:21:31.808 [STDERR] Child process with pid: 157543 was killed by signal: 11, core dump: 128
    2017-05-22 18:21:31.930 [STDERR] Child process with pid: 157523 was killed by signal: 11, core dump: 128
    2017-05-22 18:21:31.930 [STDERR] Child process with pid: 157562 was killed by signal: 11, core dump: 128
  • 58 Lines : 2017-05-23 04:12:XX
 

NiteWave

Administrator
#6
No.
please check /usr/local/lsws/logs/lsrestart.log

I guess your lsphp is running in non-suExec + Daemon mode.
so parent lsphp process will run very long time until lsws restart.
"Reached max children process limit" issue is automatically "fixed" by a lsws restart, then we can explain it.
 

semprot

Well-Known Member
#7
No.
please check /usr/local/lsws/logs/lsrestart.log

I guess your lsphp is running in non-suExec + Daemon mode.
so parent lsphp process will run very long time until lsws restart.
"Reached max children process limit" issue is automatically "fixed" by a lsws restart, then we can explain it.
I have cron job to restart httpd every 2 hours :
Code:
0 */2 * * * /etc/init.d/httpd restart > /dev/null 2>&1
Here is content of restart log
https://pastebin.com/iAAzesPF
I guess your lsphp is running in non-suExec + Daemon mode.
Maybe, how can i check?
Thank you.
 

Pong

Administrator
Staff member
#8
Reached max children process limit: 720, extra: 1000, current: 1720.
Are so much php processes normal? What change did you make before it happened?

Also seems PHP crash: 2017-05-22 18:21:31.930 [STDERR] Child process with pid: 157562 was killed by signal: 11, core dump: 128
Try to investigate the core file why PHP crash happened.
 

semprot

Well-Known Member
#9
Are so much php processes normal? What change did you make before it happened?

Also seems PHP crash: 2017-05-22 18:21:31.930 [STDERR] Child process with pid: 157562 was killed by signal: 11, core dump: 128
Try to investigate the core file why PHP crash happened.
I've had this max children "issue" since november 2016.
However after i've reviewed the "lsrestart.log", it seems the restart only happens on cron that i set, and some other restarts might be trigered by me manually from WHM (sometimes i restart the httpd after uploading PHP files to clear the cache, because i use opcache).
The core dump file is usually more than 1 GB in size, so i usually delete it once i have noticed it.
The next time i find it, i will check the file content.
 
Top