mod_lsapi in error_log - what would trigger this?
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Anonymous User
  2. Monday, 06 April 2020
  3.  Subscribe via email
I have been trying to figure out this error for months now. I recently moved to the mod_lsapi (litespeed) php handler and with that the information shown in the error log gives me a little more information to go by.

I have lots of these showing up in the apache error_log, no specific time, throughout the day, every day. All are similar with the client, post url, content-length, and tmpstackbuf changing. ALL urls in the errors are within the same folder on our site. The scripts in this particular folder are used to communicate with our software installed on other computers - think of it as an api of sorts.

[Mon Apr 06 12:13:31.544526 2020] [lsapi:error] [pid 30721:tid 47719003518720] [client 111.111.111.111:50846] [host http://www.example.com] Client error on sending request(POST /some_app/app/add_example_log.php HTTP/1.1); uri(/some_app/app/add_example_log.php) content-length(58821): user_get_body(tmpstackbuf, 16384): read from client failed


Some history and more information :


  • There is not a problem with the php script(s) at the url shown. These are very simple php scripts that take $_POST data, do something, then exit with a response. Yes, I am sure these scripts are not the issue.

  • I do not believe mod_lsapi to be the issue either as the error still happened before when we were using another php handler on the server, but the errors provided in the logs did not provide as much information as they do now. We can now see all of these stem from a single folder of php scripts that are only used by our software to communicate with the server (like an api).


My 'guess' is the software, which is sending these posts to our scripts is missing something. Is it possible that there are headers not being sent which could cause this to happen, not encoding the send, etc? Basically I am curious what would trigger mod_lsapi to report an error like it did.

To add yet another twist, these errors do not happen for every request to these scripts either - most hits to these scripts from the same software do not cause an error like this.

Any insight, suggestions, possibilities, etc would be very appreciated!
Rate this post:
  1. 07.04.2020 09:04:08
  2. # 1
Sergey Khristich Accepted Answer
Posts: 338
Joined: 20.05.2019
0
Votes
Undo
Hello,
Thank you for reaching out! Set lsapi_disable_reject_mode On in your lsapi.conf and reload Apache. This way LSPHP daemon will put requests that cannot be served by LSPHP daemon right away into infinite queue, until one or more LSPHP daemon becomes free. Visit Configuration Reference for more info. This doc also may be helpful https://docs.cloudlinux.com/cloudlinux_os_components/#troubleshooting-4
If you have any other questions, feel free to ask here. Thank you for contacting us.
Marketing Manager
  1. 07.04.2020 17:04:58
  2. # 2
Guest Accepted Answer
Thank you for the quick reply. I will go ahead and change this and see what happens. Using whm/cpanel... can you confirm /etc/apache2/conf.d/lsapi.conf is where settings should be changed/edited and will hold through updates in the future?
  1. 07.04.2020 17:04:38
  2. # 3
Sergey Khristich Accepted Answer
Posts: 338
Joined: 20.05.2019
0
Votes
Undo
Hello Steve,
If you require any further information, let me know.
Thanks.
Marketing Manager
  1. 07.04.2020 17:04:56
  2. # 4
Steve Accepted Answer
Posts: 3
Joined: 09.10.2019
0
Votes
Undo
lsapi_disable_reject_mode is not an option on /etc/apache2/conf.d/lsapi.conf

Is this option available in mod_lsapi apache module (1.1-36.37.16.cpanel) using cpanel/whm - the module installed through easy apache 4?
  1. 07.04.2020 18:04:18
  2. # 5
Steve Accepted Answer
Posts: 3
Joined: 09.10.2019
0
Votes
Undo
I manually added that line to /etc/apache2/conf.d/lsapi.conf - restarted apache. Errors are still coming in. I didn't think this was mod_lsapi related to begin with and this kind of backs that up. So, what situations would come up from a post request which would trigger this error to be shown by mod_lsapi?
  1. 08.04.2020 10:04:30
  2. # 6
Sergey Khristich Accepted Answer
Posts: 338
Joined: 20.05.2019
0
Votes
Undo
Hello Steve,
As advised by developers, try content-length validation before sending a post request. This error is possible in mod_lsapi when the declared content-length in the request header does not match the length of the request itself.
Thank you.
Marketing Manager
  1. 08.04.2020 17:04:24
  2. # 7
Steve Accepted Answer
Posts: 3
Joined: 09.10.2019
0
Votes
Undo
Thank you. This will help a lot as it gives me a starting point to look at and check.
  1. 09.04.2020 09:04:20
  2. # 8
Sergey Khristich Accepted Answer
Posts: 338
Joined: 20.05.2019
0
Votes
Undo
Hello Steve,
Thanks for following up! Drop me a line if I can do anything else for you.
Marketing Manager
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.