mod_lsapi installed and finding some errors/issues in logs now

morrow95

Well-Known Member
Oct 8, 2006
189
12
168
Just installed mod_lsapi yesterday and while I am not noticing any issues there appears to be some behind the scenes. This server has heavy traffic, but the cast majority are very small requests that happen quickly. I was previously using suphp and suexec. After adding mod_lsapi in EA4 the only thing I have changed is the handler in multiphp manager to lsapi. Here are some of the things I have found so far :

Code:
/var/log/apache2/lsphp-stderr.log :
[8792] Reached max children process limit: 120, extra: 0, current: 120, busy: 120, please increase LSAPI_CHILDREN.

/var/log/apache2/sulsphp_log :
[Wed Oct 09 12:45:44 2019] sulsphp: uid:(502/user); gid:(502/user); with suexec mode; cmd:(/opt/cpanel/ea-php73/root/usr/bin/lsphp)

/var/log/apache2/error_log :
[Tue Oct 08 23:31:21.596388 2019] [lsapi:error] [pid 8032:tid 47763622516480] [client 111.111.111.111:58730] [host www.example.com] get_client_block(16384) failed
[Tue Oct 08 23:31:21.596431 2019] [lsapi:error] [pid 8032:tid 47763622516480] [client 111.111.111.111:58730] [host www.example.com] Client error on sending request(POST /app/app/add_log.php HTTP/1.1); uri(/app/app/add_log.php) content-length(994): user_get_body(tmpstackbuf, 16384): read from client failed

Any advice would be appreciated. The 1st and 3rd worry me as it looks as though we are denying/failing requests which is going to be a problem.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
These errors look related to the first error:

Code:
[8792] Reached max children process limit: 120, extra: 0, current: 120, busy: 120, please increase LSAPI_CHILDREN.
This indicates that you're reaching the max children process limit for LSAPI which would indicate you're running 120 PHP processes under a single user which would be extremely high.
 

morrow95

Well-Known Member
Oct 8, 2006
189
12
168
I know what it means, but where is the mystery file that holds the settings for lsapi that cpanel is using? Its not in php.ini - at least the one shown by the editor in multiphp ini editor in whm.
 

morrow95

Well-Known Member
Oct 8, 2006
189
12
168
Thanks! Now, can we directly modify this file without worrying about those edits being overwritten? More often than not when editing files directly like this they do not 'stay' after automatic updates and what not when using WHM/cpanel.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Ultimately though, the point I was trying to make is that you shouldn't be hitting that limit in a normal environment. It's abnormally high and rather than change it, I'd suggest looking at the activity.
 

morrow95

Well-Known Member
Oct 8, 2006
189
12
168
I am assuming those limits were hit after enabled and/or after reboots - in other words it didn't prime itself for what was coming when it started up. Those limits have not been hit since. We average anywhere from 30-100+ requests a sec constantly depending on time of day for this server.

Is it possible to have timestamps added to the entries in /var/log/apache2/lsphp-stderr.log to make sure? A file somewhere that has the logging settings for it? As it is currently there is no timestamp as shown in the OP.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
I'd suggest opening a ticket so we can look into it further. You can open a ticket using the link in my signature. Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!
 

morrow95

Well-Known Member
Oct 8, 2006
189
12
168
Just need to know if I can add the timestamp to the entries in /var/log/apache2/lsphp-stderr.log and where. I can figure out if these are happening on reboot as I suspect or randomly throughout the day if I have a timestamp for them.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
The reason why i requested you open a ticket is because I'm unsure you'd be able to do this, I believe it might have to be something added to the lsapi module.

Thanks!