PHP 5.2.6
Name: phpLsapi
Address: uds://tmp/lshttpd/lsphp.sock
Notes : Not Set
Max Connections: 500
Environment:
PHP_LSAPI_MAX_REQUESTS=2000
PHP_LSAPI_CHILDREN=500
LSAPI_MAX_PROCESS_TIME=3000
Initial Request Timeout (secs): 100
Retry Timeout (secs): 0
Persistent Connection: Not Set
Connection Keepalive Timeout: Not Set
Response Buffering: No
Auto Start: Yes
Command: $SERVER_ROOT/fcgi-bin/lsphp -c ../php
Back Log: 100
Instances: 1
Run On Start Up: Yes
Max Idle Time: Not Set
Priority: 0
Memory Soft Limit (bytes): 0
Memory Hard Limit (bytes): 0
Process Soft Limit: 0
Process Hard Limit: 0
APC 3.0.19
MySQL 5.0.45
Litespeed Web Server Enterprise v3.3.23, 4 CPU
2 * dual Woodcrest, 8GB RAM
RHEL 5 64-bit
No CP's, no other http servers.
I don't know if this really LS bug but this happened yesterday:
Symptoms:
1. Suddenly (withing 2 minutes) there were 700 "lsphp -c ../php" processes which were not doing anything.
2. System load dropped to near zero (as nothing was served).
3. Pages were not served, or in rare attempts partially.
Log has 5 times "oops! 503 Service Unavailable" and after that no more 503's but tons of "Content len: 0" lines like
2009-01-02 20:01:08.901 [NOTICE] [121.44.19.108:19988-0#domain:lsapi] Content len: 0, Request line:
GET /thisurl HTTP/1.1
I restarted the server gracefully and it was back to full speed. But there were still 600 extra lsphp processes there.
In the end of log you have
2009-01-02 20:01:09.529 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 9213 !
2009-01-02 20:01:09.529 [INFO] [AutoRestater] Clean up child process with pid: 9214
2009-01-02 20:01:09.529 [INFO] [AutoRestater] Clean up child process with pid: 22544
2009-01-02 20:01:09.529 [INFO] [AutoRestater] Clean up child process with pid: 22920
2009-01-02 20:01:09.630 [NOTICE] [AutoRestarter] child process with pid=9213 exited with status=0!
2009-01-02 20:01:40.121 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 9217 !
2009-01-02 20:01:40.121 [INFO] [AutoRestater] Clean up child process with pid: 9223
2009-01-02 20:01:40.222 [NOTICE] [AutoRestarter] child process with pid=9217 exited with status=0!
2009-01-02 20:01:40.222 [NOTICE] [PID:3400] Server Stopped!
Next error log has:
2009-01-02 20:05:24.677 [INFO] Pass listener *:80.
2009-01-02 20:05:24.677 [INFO] Pass listener *:7080.
2009-01-02 20:05:24.677 [NOTICE] [Child: 22930] Start shutting down gracefully ...
2009-01-02 20:05:24.677 [NOTICE] [Child: 22928] Start shutting down gracefully ...
2009-01-02 20:05:24.953 [NOTICE] [ADMINS_IP_HERE:62898-80#_AdminVHost] [STDERR] PHP Warning: file_get_contents(/tmp/lshttpd/.rtreport) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in /opt/lsws/admin/html.3.3.23/classes/STATS.php on line 160
2009-01-02 20:05:25.832 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 22932 !
2009-01-02 20:05:25.832 [INFO] [AutoRestater] Clean up child process with pid: 22941
2009-01-02 20:05:25.933 [NOTICE] [AutoRestarter] child process with pid=22932 exited with status=0!
2009-01-02 20:05:26.664 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 22931 !
2009-01-02 20:05:26.664 [INFO] [AutoRestater] Clean up child process with pid: 22945
2009-01-02 20:05:26.765 [NOTICE] [AutoRestarter] child process with pid=22931 exited with status=0!
2009-01-02 20:05:27.520 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 22928 !
2009-01-02 20:05:27.520 [INFO] [AutoRestater] Clean up child process with pid: 22929
2009-01-02 20:05:27.520 [INFO] [AutoRestater] Clean up child process with pid: 22978
2009-01-02 20:05:27.520 [INFO] [AutoRestater] Clean up child process with pid: 23499
2009-01-02 20:05:27.622 [NOTICE] [AutoRestarter] child process with pid=22928 exited with status=0!
2009-01-02 20:05:28.060 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 22930 !
2009-01-02 20:05:28.060 [INFO] [AutoRestater] Clean up child process with pid: 22937
2009-01-02 20:05:28.161 [NOTICE] [AutoRestarter] child process with pid=22930 exited with status=0!
2009-01-02 20:05:28.161 [NOTICE] [PID:22926] Server Stopped!
I stopped and started the server from shell as root and still this processes were there. Pids for those where around 23000-24000, they were started about 19:46-19:47 (as far as I can recall).
Process tree revealed that those 700 processes did not have parent, so apparently that was why LS could not kill them.
I stopped the server, killed them manually with "killall lsphp" and started the server.
There is no core dump (it's disabled).
I know it's vague, but I reported this because to me it does not look like "as designed" that LS can have parentless lsphp's that do not deliver content at all (although LS seemed to think they were usable and ok), and also to me it is a problem that LS can not detect and restart server when it serves zero content continuously. Luckily I was there this time.
If there are any settings above that needs tweaking to prevent situations like this, I'll be happy to try them.
Name: phpLsapi
Address: uds://tmp/lshttpd/lsphp.sock
Notes : Not Set
Max Connections: 500
Environment:
PHP_LSAPI_MAX_REQUESTS=2000
PHP_LSAPI_CHILDREN=500
LSAPI_MAX_PROCESS_TIME=3000
Initial Request Timeout (secs): 100
Retry Timeout (secs): 0
Persistent Connection: Not Set
Connection Keepalive Timeout: Not Set
Response Buffering: No
Auto Start: Yes
Command: $SERVER_ROOT/fcgi-bin/lsphp -c ../php
Back Log: 100
Instances: 1
Run On Start Up: Yes
Max Idle Time: Not Set
Priority: 0
Memory Soft Limit (bytes): 0
Memory Hard Limit (bytes): 0
Process Soft Limit: 0
Process Hard Limit: 0
APC 3.0.19
MySQL 5.0.45
Litespeed Web Server Enterprise v3.3.23, 4 CPU
2 * dual Woodcrest, 8GB RAM
RHEL 5 64-bit
No CP's, no other http servers.
I don't know if this really LS bug but this happened yesterday:
Symptoms:
1. Suddenly (withing 2 minutes) there were 700 "lsphp -c ../php" processes which were not doing anything.
2. System load dropped to near zero (as nothing was served).
3. Pages were not served, or in rare attempts partially.
Log has 5 times "oops! 503 Service Unavailable" and after that no more 503's but tons of "Content len: 0" lines like
2009-01-02 20:01:08.901 [NOTICE] [121.44.19.108:19988-0#domain:lsapi] Content len: 0, Request line:
GET /thisurl HTTP/1.1
I restarted the server gracefully and it was back to full speed. But there were still 600 extra lsphp processes there.
In the end of log you have
2009-01-02 20:01:09.529 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 9213 !
2009-01-02 20:01:09.529 [INFO] [AutoRestater] Clean up child process with pid: 9214
2009-01-02 20:01:09.529 [INFO] [AutoRestater] Clean up child process with pid: 22544
2009-01-02 20:01:09.529 [INFO] [AutoRestater] Clean up child process with pid: 22920
2009-01-02 20:01:09.630 [NOTICE] [AutoRestarter] child process with pid=9213 exited with status=0!
2009-01-02 20:01:40.121 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 9217 !
2009-01-02 20:01:40.121 [INFO] [AutoRestater] Clean up child process with pid: 9223
2009-01-02 20:01:40.222 [NOTICE] [AutoRestarter] child process with pid=9217 exited with status=0!
2009-01-02 20:01:40.222 [NOTICE] [PID:3400] Server Stopped!
Next error log has:
2009-01-02 20:05:24.677 [INFO] Pass listener *:80.
2009-01-02 20:05:24.677 [INFO] Pass listener *:7080.
2009-01-02 20:05:24.677 [NOTICE] [Child: 22930] Start shutting down gracefully ...
2009-01-02 20:05:24.677 [NOTICE] [Child: 22928] Start shutting down gracefully ...
2009-01-02 20:05:24.953 [NOTICE] [ADMINS_IP_HERE:62898-80#_AdminVHost] [STDERR] PHP Warning: file_get_contents(/tmp/lshttpd/.rtreport) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in /opt/lsws/admin/html.3.3.23/classes/STATS.php on line 160
2009-01-02 20:05:25.832 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 22932 !
2009-01-02 20:05:25.832 [INFO] [AutoRestater] Clean up child process with pid: 22941
2009-01-02 20:05:25.933 [NOTICE] [AutoRestarter] child process with pid=22932 exited with status=0!
2009-01-02 20:05:26.664 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 22931 !
2009-01-02 20:05:26.664 [INFO] [AutoRestater] Clean up child process with pid: 22945
2009-01-02 20:05:26.765 [NOTICE] [AutoRestarter] child process with pid=22931 exited with status=0!
2009-01-02 20:05:27.520 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 22928 !
2009-01-02 20:05:27.520 [INFO] [AutoRestater] Clean up child process with pid: 22929
2009-01-02 20:05:27.520 [INFO] [AutoRestater] Clean up child process with pid: 22978
2009-01-02 20:05:27.520 [INFO] [AutoRestater] Clean up child process with pid: 23499
2009-01-02 20:05:27.622 [NOTICE] [AutoRestarter] child process with pid=22928 exited with status=0!
2009-01-02 20:05:28.060 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 22930 !
2009-01-02 20:05:28.060 [INFO] [AutoRestater] Clean up child process with pid: 22937
2009-01-02 20:05:28.161 [NOTICE] [AutoRestarter] child process with pid=22930 exited with status=0!
2009-01-02 20:05:28.161 [NOTICE] [PID:22926] Server Stopped!
I stopped and started the server from shell as root and still this processes were there. Pids for those where around 23000-24000, they were started about 19:46-19:47 (as far as I can recall).
Process tree revealed that those 700 processes did not have parent, so apparently that was why LS could not kill them.
I stopped the server, killed them manually with "killall lsphp" and started the server.
There is no core dump (it's disabled).
I know it's vague, but I reported this because to me it does not look like "as designed" that LS can have parentless lsphp's that do not deliver content at all (although LS seemed to think they were usable and ok), and also to me it is a problem that LS can not detect and restart server when it serves zero content continuously. Luckily I was there this time.
If there are any settings above that needs tweaking to prevent situations like this, I'll be happy to try them.