|
|

02-19-2012, 02:21 AM
|
|
Member
|
|
Join Date: Jun 2010
Posts: 14
|
|
LSAPI Sockets Closing Periodically
I am having an issue where I have a few sites setup using PHP with the LSAPI external app. Each one has its own external app config so that I can use suEXEC and have each site run its own PHP processes. However, since switching over to this config, I am finding occasional 503 service unavailable errors with this showing up in the error log:
Code:
2012-02-19 04:10:41.188 [INFO] [66.249.71.161:42504-0#wayward] connection to [/tmp/lshttpd/wayward_lsphp.sock] on request #0, confirmed, 0, associated process: 5264, running: 1, error: No such file or directory!
2012-02-19 04:10:41.188 [INFO] [uds://tmp/lshttpd/wayward_lsphp.sock] Connection refused, restart!
2012-02-19 04:10:41.189 [INFO] [66.249.71.161:42504-0#wayward] connection to [/tmp/lshttpd/wayward_lsphp.sock] on request #0, confirmed, 0, associated process: 5264, running: 1, error: No such file or directory!
2012-02-19 04:10:41.189 [INFO] [uds://tmp/lshttpd/wayward_lsphp.sock] Connection refused, restart!
2012-02-19 04:10:41.189 [INFO] [66.249.71.161:42504-0#wayward] connection to [/tmp/lshttpd/wayward_lsphp.sock] on request #0, confirmed, 0, associated process: 5264, running: 1, error: No such file or directory!
2012-02-19 04:10:41.189 [INFO] [uds://tmp/lshttpd/wayward_lsphp.sock] Connection refused, restart!
2012-02-19 04:10:41.189 [NOTICE] [66.249.71.161:42504-0#wayward] Max retries has been reached, 503!
2012-02-19 04:10:41.189 [NOTICE] [66.249.71.161:42504-0#wayward] oops! 503 Service Unavailable
2012-02-19 04:10:41.189 [NOTICE] [66.249.71.161:42504-0#wayward] Content len: 0, Request line: 'GET /find-new/494107/threads?_debug=1 HTTP/1.1'
2012-02-19 04:10:41.189 [NOTICE] [66.249.71.161:42504-0#wayward] Redirect: #1, URL: /index.php
The lsphp.sock files appear to be getting closed and vanishing periodically so that they have to be restarted. I am also seeing lots of these statements in the log:
Code:
2012-02-19 04:10:12.000 [INFO] [CLEANUP] Clean up child process with pid: 5229
2012-02-19 04:10:12.000 [INFO] [CLEANUP] Clean up child process with pid: 5231
2012-02-19 04:10:12.006 [INFO] Remove pid: 5229, exitcode: 0
2012-02-19 04:10:12.010 [INFO] Remove pid: 5231, exitcode: 0
2012-02-19 04:10:22.000 [INFO] [CLEANUP] Clean up child process with pid: 5260
2012-02-19 04:10:22.008 [INFO] Remove pid: 5260, exitcode: 0
I have the external app set to auto start and run on startup with persistent connections turned on.
Any ideas how I can resolve these errors?
Thanks!
Last edited by Ghan_04; 02-19-2012 at 02:25 AM..
|

02-19-2012, 04:51 PM
|
|
Member
|
|
Join Date: Jun 2010
Posts: 14
|
|
|
Ok so I think I found the setting that "fixes" this.
The external app's "Max Idle Time" should be set to -1 so that none of the sockets get killed to free up resources.
However, this results in a lot of child lsphp5 processes stacking up taking up RAM, which I would like to avoid if possible.
It sounds like this might be a bug - the fact that the socket gets killed to free up resources should not result in a 503 next time someone requests a page from that virtual host. Is there another configuration setup that I'm missing that fixes this?
Thanks.
Last edited by Ghan_04; 02-19-2012 at 04:54 PM..
|

02-19-2012, 06:57 PM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,293
|
|
|
what's other settings in lsphp ?
Max Connections
Connection Keepalive Timeout
Instances
for
Run On Start Up,
you can set it to No to see if any difference.
|

02-19-2012, 07:10 PM
|
|
Member
|
|
Join Date: Jun 2010
Posts: 14
|
|
|
Max Connections = 5
Connection Keepalive Timeout = Blank
Instances = 1
Changing Run on Startup to No with my previous value of Max Idle Time (10) did not seem to have any effect - I'm seeing the same messages in the error log.
|

02-19-2012, 07:34 PM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,293
|
|
|
forgot to ask
Environment
setting in Ext App.
|

02-19-2012, 08:07 PM
|
|
Member
|
|
Join Date: Jun 2010
Posts: 14
|
|
|
Right now I've got it set to this:
PHP_LSAPI_MAX_REQUESTS=10
PHP_LSAPI_CHILDREN=5
I had the max requests set much higher earlier - it doesn't seem to make much difference.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 07:46 AM.
|
|