lsws stopped suddently ?

vivek

Well-Known Member
#1
Hello
I just found that the lsws stopped

I restarted litespeed, and is running ok now. It is the second time lsws is quitting like this. Clients are complaining about this.

I checked the log and become mad.
I backed up the old error_log file to error_log1

george can you take a look at this ? I hope you have the server login.

Vivek
 

vivek

Well-Known Member
#2
Hello

I am looking for a modification of the restart cron script.

Origianl : http://litespeedtech.com/support/forum/showthread.php?p=9185#post9185


I may require both, Apache and Litespeed. So I want to include codes for apache restart.

I want something like this.

Cron job : 1 or 5 minutes interval.

start
check whether apache wrapper is used or not.
If wrapper scritpt is using
{
. check whether lshttpd is running or not.
. if not running , restart it and send a mail to the root with date and time.
}

else
. check whether apache is running or not
. if it is not running, restart httpd. , send a mail to root with date and time.
stop



I am not good in bash scripting, can anyone help me for this code ?
 

vivek

Well-Known Member
#3
BTW, why dont litespeed itself install such a cron ? So that litespeed will never exit.

There was 1.5hrs of downtime today because of this.
 

hadyabed

Active Member
#4
What version of LSWS are you running? I believe there was just a bug fix for lshttpd stopping randomly in version 3.3.10. If you don't have this version, you may want to upgrade.
-Hady Abed
 

Dani

Well-Known Member
#5
I've seen similar things on our server, the lshttpd process is running, and some lsphp but I can't access the webpage, a restart helped it for about 10minutes. But after that it killed connections again, finally a reboot of the server seems to have done it. (this with the latest .10 version).

No weird activities in the log files can be seen. I'm still monitoring this and can hopefully try to locate something useful if it continiues.
 

mistwang

LiteSpeed Staff
#6
I've seen similar things on our server, the lshttpd process is running, and some lsphp but I can't access the webpage, a restart helped it for about 10minutes. But after that it killed connections again, finally a reboot of the server seems to have done it. (this with the latest .10 version).

No weird activities in the log files can be seen. I'm still monitoring this and can hopefully try to locate something useful if it continiues.
If that is happen, please use command

kill -USR2 <pid_of_a_child_lshttpd>

to turn on debug logging and let it run for a while then send the log file to us.
Run to kill command again to turn off the debug logging.

Make sure to set server "Log Level" to "DEBUG" and server "Debug Level" to "NONE".
 

Dani

Well-Known Member
#7
If that is happen, please use command

kill -USR2 <pid_of_a_child_lshttpd>

to turn on debug logging and let it run for a while then send the log file to us.
Run to kill command again to turn off the debug logging.

Make sure to set server "Log Level" to "DEBUG" and server "Debug Level" to "NONE".
So does the kill command toggle the debug or do I have to have it enabled before running it?
 

mistwang

LiteSpeed Staff
#9
Hello
I just found that the lsws stopped

I restarted litespeed, and is running ok now. It is the second time lsws is quitting like this. Clients are complaining about this.

I checked the log and become mad.
I backed up the old error_log file to error_log1

george can you take a look at this ? I hope you have the server login.
It is caused by one your cron job that remove everything under /tmp on the 45 minutes every hour. when /tmp/lshttpd directory is removed, LSWS will have to restart itself, normally it is not a problem, the server will start fine. But for whatever reason, maybe the LSWS was killed in the middle of the restart, the new process does not get started as planed.
You should avoid removing /tmp/lshttpd directory hourly.
 

vivek

Well-Known Member
#10
It is caused by one your cron job that remove everything under /tmp on the 45 minutes every hour. when /tmp/lshttpd directory is removed, LSWS will have to restart itself, normally it is not a problem, the server will start fine. But for whatever reason, maybe the LSWS was killed in the middle of the restart, the new process does not get started as planed.
You should avoid removing /tmp/lshttpd directory hourly.
Ok, I removed the cron. I added the cron because I found that some users are using c99,snipper shells and that is causing a file /tmp/back which is actually an executable file starting with #! , plus the litespeed didnt work with modsec rules for preventing shell file executions ( c99 etc ) through 80 port

Vivek
 
Top