Solutions

Search  Users  Rules 
Close
Login:
Password:
Forgot your password?
Register
Login Register
 
Pages: 1
RSS
CloudLinux 503 errors and Litespeed's 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 CloudLinux's 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 Cloudlinux's 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…
With LiteSpeed 503 means strictly litespeed internal error.
We are using 508 right now to display resource limit reached.
You're right, seems that LiteSpeed can't 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
Igor, could you check here ? :

http://www.litespeedtech.com/support/forum/showthread.php?p=59387#post59387

Quote
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.
>>> it's suggested to set cloulinx's resource limit always greater than litepeed's...


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't want to force (nor a have a way too...) our solution on them. It is up to them how to implement such things.
Thanks,

We're 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't 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 ?
Yes, all they have to do is instead of restarting server -- produce error page.
Also, just to clarify this "all they have to do" -- might be quite a big chunk of work, depending on their overall design.
Thanks,

About detecting the error, is Cloudlinux's error message always the same, is there some way for them to always know it's a "limited by CloudLinux" error ?
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)
Litespeed 4.2.5 now has CL lve ressource limit compatibility ! It should now show 508 errors !
Pages: 1
Users browsing this topic (1 guests, 0 registered, 0 hidden)