litespeed stuck

Discussion in 'General' started by jackc, Oct 17, 2009.

  1. jackc

    jackc New Member

    i'm a new litespeed user, just got litespeed installed on some servers replacing apache.
    tonight i notice litespeed on one of the servers got stuck somehow, unable to access litespeed admin panel, unable to open up websites, while server load is very low and not much network activity. i checked everything and can't find out why it's stuck, finally i had to kill the litespeed process and restart litespeed, then everything works fine again.
    is there a way to prevent this problem? except use a http service monitor...
  2. jackc

    jackc New Member

    it seems litespeed got stuck when directadmin doing daily log rotation and backup, not sure why just this server has this problem.
  3. mistwang

    mistwang LiteSpeed Staff

    If I/O wait is very high, it may affect the lshttpd, please try "strace -tt -T -p <pid_lshttpd>" see what is going on.

    AIO in 4.1 will solve this issue.
  4. jackc

    jackc New Member

    this problem start happening on another server, with very low i/o wait.
    strace result is too long.
  5. NiteWave

    NiteWave Administrator

    it may relate to the log rotation.

    for example:
    Code:
    /etc/logrotate.d>cat syslog 
    /var/log/kernel /var/log/messages {
        sharedscripts
        postrotate
            /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
        endscript
    }
    
    for lsws log, it's not necessary to execute the postrotate command:
    Code:
            /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    
    can you find out the log rotate script of DirectAdmin, and try to change it.

    update: following example is better than syslogd:
    Code:
    /etc/logrotate.d>cat httpd
    /var/log/httpd/*log {
        missingok
        notifempty
        sharedscripts
        postrotate
            /sbin/service httpd reload > /dev/null 2>/dev/null || true
        endscript
    }
    
    Last edited: Oct 29, 2009
  6. jackc

    jackc New Member

    it's possible caused by high i/o when the system was cleaning /tmp
    really hope the next release fix this problem because it's annoying.
  7. NiteWave

    NiteWave Administrator

    /tmp/lshttpd is used by lshttpd, can't be deleted when lsws is running.
  8. jackc

    jackc New Member

    no, it was cleaning php opcode caches.
  9. NiteWave

    NiteWave Administrator

    I used to use APC, and never experienced "lsws stuck" when cleaning APC cache. Maybe you can try the built-in clean-up function in the opcode cache you're using if it exists, instead of shell command rm.
  10. mistwang

    mistwang LiteSpeed Staff

    If there are enough memory on your server, you can move php opcode cache to under /dev/shm.
  11. jackc

    jackc New Member

    i know. but there could be other things causing temporary high i/o, too much randomness, so i just want to see lshttpd don't get stuck if that happens.
  12. mistwang

    mistwang LiteSpeed Staff

    4.1 release with AIO will do much better in this regard.

Share This Page