503 Service Unavailable

#1
This is the error log
[INFO] [84.94.154.131:31858-0#saleinfo] connection to [/tmp/lshttpd/saleinfo_lsphp.sock.296] on request #0, confirmed, 1, associated process: 29954, running: 1, error: Connection reset by peer!
2013-11-24 06:20:39.061 [INFO] [84.94.154.131:31858-0#saleinfo] connection to [/tmp/lshttpd/saleinfo_lsphp.sock.296] on request #1, confirmed, 1, associated process: 29954, running: 1, error: Connection reset by peer!
2013-11-24 06:20:39.061 [NOTICE] [84.94.154.131:31858-0#saleinfo] Max retries has been reached, 503!
2013-11-24 06:20:39.061 [NOTICE] [84.94.154.131:31858-0#saleinfo] oops! 503 Service Unavailable
2013-11-24 06:20:39.061 [NOTICE] [84.94.154.131:31858-0#saleinfo] Content len: 0, Request line: 'GET / HTTP/1.1'
2013-11-24 06:20:39.062 [INFO] [84.94.154.131:31858-0#saleinfo] abort request..., code: 4

stderr.log
[STDERR] Child process with pid: 29824 was killed by signal: 7, core dump: 0
2013-11-24 06:17:36.201 [STDERR] Child process with pid: 29893 was killed by signal: 7, core dump: 0
2013-11-24 06:17:43.039 [STDERR] Child process with pid: 29876 was killed by signal: 7, core dump: 0
2013-11-24 06:17:43.137 [STDERR] Child process with pid: 29889 was killed by signal: 7, core dump: 0
2013-11-24 06:17:43.247 [STDERR] Child process with pid: 29906 was killed by signal: 7, core dump: 0
2013-11-24 06:17:43.960 [STDERR] Child process with pid: 29866 was killed by signal: 7, core dump: 0
2013-11-24 06:17:45.353 [STDERR] Child process with pid: 29885 was killed by signal: 7, core dump: 0

what cause this problem? thank you for help.
 

wanah

Well-Known Member
#2
Are you running the latest version of litespeed and lsapi ? If you are running 4.2.4 or less and cloudlinux you need to update litespeed and lsapi. If this is not the case then wait for litespeed staff to answer :)
 
#3
Are you running the latest version of litespeed and lsapi ? If you are running 4.2.4 or less and cloudlinux you need to update litespeed and lsapi. If this is not the case then wait for litespeed staff to answer :)
Thank you,I'm running 4.2.4,I updated it to 4.2.6 now,but I don't know how to update lsapi,could you tell me?
 

wanah

Well-Known Member
#4
Supposing you are in cPanel, run build matching php version from inside the litespeed plugin.

It will probably detect that you aleady have the same version of PHP but will give you the option to force the rebuild anyway.
 
#5
after update to latest version of litespeed and lsapi ,still have 503 error sometimes.

error.log

2013-11-25 08:18:24.647 [INFO] [157.55.32.143:28368-2#saleinfo:lsapi] connection to [/tmp/lshttpd/saleinfo_lsphp.sock] on request #1, confirmed, 1, associated process: 16306, running: 1, error: Connection reset by peer!
2013-11-25 08:18:25.077 [INFO] [157.55.32.143:28368-2#saleinfo:lsapi] connection to [/tmp/lshttpd/saleinfo_lsphp.sock] on request #0, confirmed, 1, associated process: 16306, running: 1, error: Connection reset by peer!
2013-11-25 08:18:25.560 [INFO] [157.55.32.143:28368-2#saleinfo:lsapi] connection to [/tmp/lshttpd/saleinfo_lsphp.sock] on request #0, confirmed, 1, associated process: 16306, running: 1, error: Connection reset by peer!
2013-11-25 08:18:25.560 [NOTICE] [157.55.32.143:28368-2#saleinfo:lsapi] Max retries has been reached, 503!
2013-11-25 08:18:25.560 [NOTICE] [157.55.32.143:28368-2#saleinfo:lsapi] oops! 503 Service Unavailable
 
#7
what's your setting of lsphp5 ?

lsws webadmin->Server->Ext App->lsphp5
setting

Max Connections 35
Environment

PHP_LSAPI_MAX_REQUESTS=500
PHP_LSAPI_CHILDREN=35
LSAPI_MAX_PROCESS_TIME=3600
Initial Request Timeout (secs)
120
Retry Timeout (secs)
0
Persistent Connection
Yes
Connection Keepalive Timeout
-1
Response Buffering
No
Auto Start
Yes
Command
$SERVER_ROOT/fcgi-bin/lsphp5
Back Log
100
Instances
1
suEXEC User
Not Set
suEXEC Group
Not Set
Run On Start Up
Not Set
Max Idle Time
-1
Priority
0
Memory Soft Limit (bytes)
500M
Memory Hard Limit (bytes)
550M
Process Soft Limit
200
Process Hard Limit
200
 
#9
looks normal

what php extensions loaded ? please grep php.ini for
extension=...
zend_extension=...
extension=/usr/lib/php5/20100525+lfs/ssh2.so
extension=/usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20100525/zip.so
; =================
; XCache
; =================
extension = /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20100525/xcache.so

zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.4.so

zend_extension = /usr/local/lib/Zend/ZendGuardLoader.so
 

wanah

Well-Known Member
#10
When we last tested xcache it regularly crashed php. This could be the cause of the 503 errors.

For PHP 5.3 we're going to give apc another try with the processgroup mode and for PHP 5.5 we will be going with Zendopcache for PHP 5.4 not sure yet which one to choose !
 
#12
after update to latest version of litespeed and lsapi ,still have 503 error sometimes.

error.log

2013-11-25 08:18:24.647 [INFO] [157.55.32.143:28368-2#saleinfo:lsapi] connection to [/tmp/lshttpd/saleinfo_lsphp.sock] on request #1, confirmed, 1, associated process: 16306, running: 1, error: Connection reset by peer!
2013-11-25 08:18:25.077 [INFO] [157.55.32.143:28368-2#saleinfo:lsapi] connection to [/tmp/lshttpd/saleinfo_lsphp.sock] on request #0, confirmed, 1, associated process: 16306, running: 1, error: Connection reset by peer!
2013-11-25 08:18:25.560 [INFO] [157.55.32.143:28368-2#saleinfo:lsapi] connection to [/tmp/lshttpd/saleinfo_lsphp.sock] on request #0, confirmed, 1, associated process: 16306, running: 1, error: Connection reset by peer!
2013-11-25 08:18:25.560 [NOTICE] [157.55.32.143:28368-2#saleinfo:lsapi] Max retries has been reached, 503!
2013-11-25 08:18:25.560 [NOTICE] [157.55.32.143:28368-2#saleinfo:lsapi] oops! 503 Service Unavailable
Try setting PHP_LSAPI_CHILDREN to higher value like 100 for example. You should see zero 503 errors or a lot less.
I have already open ticket regarding this bug, I think the solution is on it's way.
For now temporary fix is just to set PHP_LSAPI_CHILDREN to a high value, depends of how php busy your server is.
 
#13
Try setting PHP_LSAPI_CHILDREN to higher value like 100 for example. You should see zero 503 errors or a lot less.
I have already open ticket regarding this bug, I think the solution is on it's way.
For now temporary fix is just to set PHP_LSAPI_CHILDREN to a high value, depends of how php busy your server is.
only change server-external app or both server and virtual host external app setting?I have multiple virtual hosts.
 
#15
Same issue here today. Running PHP 5.4 with OPcache and Zend Optimizer enabled on a cPanel box.

Getting these suddenly:
connection to [/tmp/lshttpd/lsphp5.sock.780] on request #1, confirmed, 1, associated process: 4791, running: 1, error: Connection reset by peer!

Running LT 4.2.10

config attached for lsphp5 (assuming this is the one I would edit since I'm running PHP 5.4 not 5.5)
 

Attachments

Last edited:
#16
max connections:250
PHP_LSAPI_CHILDREN:100
===>not match. keep them in same value.

and please set
Run On Start Up: suEXEC Daemon

this will make opcache much more efficient
 
Top