Announcement

Collapse
No announcement yet.

CloudLinux 503 errors and Litespeeds automatic restarts on 503 error

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

  • CloudLinux 503 errors and Litespeeds automatic restarts on 503 error

    CloudLinux gives a 503 error when EP limit is reached or when the user goes well over the top with CPU limit.

    Litespeeds listens for 503 errors and does an automatic restart of the web server.

    This means that when the server is using alot of ressources beacuse of a few accounts hitting their maximum allowed ressources Litespeed starts restarting the webserver.

    Litespeed say to set CloudLinuxs EP limit higher than Litespeeds Suexec max conn limit which is a pain as we currently have different EP limits per type of account.

    I do not however see a solution for a user going well over his CPU limit…

    Is there a way to change Cloudlinuxs error message code to replace 503 Service unavailable with something like 408 Request Time out to prevent Litespeed from restarting their webserver ?

    Also 408 sounds more user freindly that 503 that souds more link an internal error…

  • #2
    With LiteSpeed 503 means strictly litespeed internal error.
    We are using 508 right now to display resource limit reached.

    Comment


    • #3
      You
      e right, seems that LiteSpeed can process the result when CloudLinux blocks a request :

      100193347-2013-04-13 19:06:34.226 [NOTICE] [CLIENTIP:51740-0#APVH_DOMAIN.TLD:lsapi] [STDERR] LSAPI: lve_enter() failure, reached resource limit.:: Argument list too long
      100193527-2013-04-13 19:06:34.226 [INFO] [CLIENTIP:51740-0#APVH_DOMAIN.TLD:lsapi] connection to [uds://tmp/lshttpd/lsphp5.sock.923988] on request #0, confirmed, 0, associated process: -1, running: 0, error: Connection reset by peer!
      100193770:2013-04-13 19:06:34.226 [NOTICE] [CLIENTIP:51740-0#APVH_DOMAIN.TLD:lsapi] Max retries has been reached, 503!
      100193899:2013-04-13 19:06:34.226 [NOTICE] [CLIENTIP:51740-0#APVH_DOMAIN.TLD:lsapi] oops! 503 Service Unavailable

      Comment


      • #4
        Igor, could you check here ? :



        > per my understanding, when lsws detect this error
        > Quote:
        > lve_enter() failure, reached resource limit
        > just throw a 508 error to browser instead of 503.
        > so the user know that he should upgrade his host plan.
        >
        > maybe CloudLinux throw 508 error to browser as well ? in case web server is apache. may be best to confirm from them.

        Comment


        • #5
          >>> its suggested to set cloulinxs resource limit always greater than litepeeds...

          It is all about how CL works from inside. There is no such thing as error 508. It is our code in mod_hostinglimits for Apache that generates it when lve_enter returns with the error (and it returns with the error when EP limit reached).

          LiteSpeed went a different way -- they just retry, and if that fails produce 503 error -- which is also a solution. I prefer ours, but I really don want to force (nor a have a way too...) our solution on them. It is up to them how to implement such things.

          Comment


          • #6
            Thanks,

            We
            e trying to find a way for Litespeed to be able to detect the lve_enter error so that they can show a different error than 503 thus not restarting the web server every time a user exceeds the limit.

            Do they just have to look for the output of lve_enter to be able to produce a 508 error on their side ?

            Restarting the web server every time a user exceeds his limit doesn sound like a solution to respond to this but more like an incompatibility issue. If Litespeed accepts to look into this issue would you be able to work with them (give them all the info they need) in order to make Litespeed fully compatible with CloudLinux ?

            Comment


            • #7
              Yes, all they have to do is instead of restarting server -- produce error page.

              Comment


              • #8
                Also, just to clarify this "all they have to do" -- might be quite a big chunk of work, depending on their overall design.

                Comment


                • #9
                  Thanks,

                  About detecting the error, is Cloudlinuxs error message always the same, is there some way for them to always know its a "limited by CloudLinux" error ?

                  Comment


                  • #10
                    it is a C function provided only by CL with error codes. So, whoever calls it -- always know if it is LVE, if it failed or not, and if failed - why (based on error codes -- which in case of EP limit -- cannot be mistaken)

                    Comment


                    • #11
                      Litespeed 4.2.5 now has CL lve ressource limit compatibility ! It should now show 508 errors !

                      Comment

                      Working...
                      X