Ошибка CloudLinux 503 и автоматическая перезагрузка Litespeed при ошибке 503
Форум
  1. Forums
  2. General
  3. General Discussion
  1. Richard Hordern
  2. Sunday, 14 April 2013
  3.  Subscribe via email
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…
Rate this post:
  1. 14.04.2013 10:04:17
  2. # 1
Igor Seletskiy Accepted Answer
Posts: 1200
Joined: 09.02.2010
0
Votes
Undo
With LiteSpeed 503 means strictly litespeed internal error.
We are using 508 right now to display resource limit reached.
  1. 14.04.2013 11:04:12
  2. # 2
Richard Hordern Accepted Answer
Posts: 219
Joined: 19.03.2011
0
Votes
Undo
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
  1. 15.04.2013 02:04:45
  2. # 3
Richard Hordern Accepted Answer
Posts: 219
Joined: 19.03.2011
0
Votes
Undo
Igor, could you check here ? :

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

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.
  1. 15.04.2013 08:04:04
  2. # 4
Igor Seletskiy Accepted Answer
Posts: 1200
Joined: 09.02.2010
0
Votes
Undo
>>> 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.
  1. 15.04.2013 11:04:22
  2. # 5
Richard Hordern Accepted Answer
Posts: 219
Joined: 19.03.2011
0
Votes
Undo
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 ?
  1. 15.04.2013 11:04:27
  2. # 6
Igor Seletskiy Accepted Answer
Posts: 1200
Joined: 09.02.2010
0
Votes
Undo
Yes, all they have to do is instead of restarting server -- produce error page.
  1. 15.04.2013 11:04:01
  2. # 7
Igor Seletskiy Accepted Answer
Posts: 1200
Joined: 09.02.2010
0
Votes
Undo
Also, just to clarify this \"all they have to do\" -- might be quite a big chunk of work, depending on their overall design.
  1. 15.04.2013 12:04:27
  2. # 8
Richard Hordern Accepted Answer
Posts: 219
Joined: 19.03.2011
0
Votes
Undo
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 ?
  1. 15.04.2013 12:04:43
  2. # 9
Igor Seletskiy Accepted Answer
Posts: 1200
Joined: 09.02.2010
0
Votes
Undo
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)
  1. 30.10.2013 20:10:20
  2. # 10
Richard Hordern Accepted Answer
Posts: 219
Joined: 19.03.2011
0
Votes
Undo
Litespeed 4.2.5 now has CL lve ressource limit compatibility ! It should now show 508 errors !
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
гость
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.