LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > lsws stopped suddently ?

Reply
 
Thread Tools Display Modes
  #1  
Old 04-22-2008, 10:47 PM
vivek vivek is offline
Senior Member
 
Join Date: Jan 2008
Posts: 275
Default lsws stopped suddently ?

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
Reply With Quote
  #2  
Old 04-23-2008, 02:43 AM
vivek vivek is offline
Senior Member
 
Join Date: Jan 2008
Posts: 275
Hello

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

Origianl : http://litespeedtech.com/support/for...=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 ?
Reply With Quote
  #3  
Old 04-23-2008, 02:45 AM
vivek vivek is offline
Senior Member
 
Join Date: Jan 2008
Posts: 275
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.
Reply With Quote
  #4  
Old 04-23-2008, 02:48 AM
hadyabed hadyabed is offline
Member
 
Join Date: Mar 2008
Posts: 39
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
Reply With Quote
  #5  
Old 04-23-2008, 08:56 AM
Dani Dani is offline
Senior Member
 
Join Date: Nov 2005
Posts: 92
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.
Reply With Quote
  #6  
Old 04-23-2008, 09:27 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Quote:
Originally Posted by Dani View Post
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".
Reply With Quote
  #7  
Old 04-23-2008, 11:00 AM
Dani Dani is offline
Senior Member
 
Join Date: Nov 2005
Posts: 92
Quote:
Originally Posted by mistwang View Post
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?
Reply With Quote
  #8  
Old 04-23-2008, 11:17 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
debug log controled by both "Log Level" and "Debug Level", "kill -USR2" toggles "Debug Level".
Reply With Quote
  #9  
Old 04-23-2008, 04:12 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Quote:
Originally Posted by vivek View Post
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.
Reply With Quote
  #10  
Old 04-23-2008, 08:10 PM
vivek vivek is offline
Senior Member
 
Join Date: Jan 2008
Posts: 275
Quote:
Originally Posted by mistwang View Post
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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:34 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.