lsws stopped suddently ?

Discussion in 'Install/Configuration' started by vivek, Apr 23, 2008.

  1. vivek

    vivek New Member

    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
  2. vivek

    vivek New Member

    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 ?
  3. vivek

    vivek New Member

    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.
  4. hadyabed

    hadyabed New Member

    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
  5. Dani

    Dani New Member

    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.
  6. mistwang

    mistwang LiteSpeed Staff

    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".
  7. Dani

    Dani New Member

    So does the kill command toggle the debug or do I have to have it enabled before running it?
  8. mistwang

    mistwang LiteSpeed Staff

    debug log controled by both "Log Level" and "Debug Level", "kill -USR2" toggles "Debug Level".
  9. mistwang

    mistwang LiteSpeed Staff

    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.
  10. vivek

    vivek New Member

    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
  11. mistwang

    mistwang LiteSpeed Staff

    You can remove files under /tmp, just do not touch /tmp/lshttpd.
  12. vivek

    vivek New Member

    I cant find such a code for removing all files except /tmp/lshttpd.

    Do you know it?

    Vivek
  13. mistwang

    mistwang LiteSpeed Staff

    I am not a shell expert. Maybe you can use 'sed' to remove entries contains /tmp/lshttpd
  14. vivek

    vivek New Member

    nevermind.

Share This Page