Announcement

Collapse
No announcement yet.

mod_lsapi in error_log - what would trigger this?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mod_lsapi in error_log - what would trigger this?

    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!

  • #2
    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/cloudlin...ubleshooting-4
    If you have any other questions, feel free to ask here. Thank you for contacting us.

    Comment


    • #3
      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?

      Comment


      • #4
        Hello Steve,
        If you require any further information, let me know.
        Thanks.

        Comment


        • #5
          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?

          Comment


          • #6
            I manually added that line to /etc/apache2/conf.d/lsapi.conf - restarted apache. Errors are still coming in. I didnt 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?

            Comment


            • #7
              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.

              Comment


              • #8
                Thank you. This will help a lot as it gives me a starting point to look at and check.

                Comment


                • #9
                  Hello Steve,
                  Thanks for following up! Drop me a line if I can do anything else for you.

                  Comment

                  Working...
                  X