excessive RAM usage

Discussion in 'Install/Configuration' started by stingreen, Dec 13, 2004.

  1. stingreen

    stingreen New Member

    We have recently switched from apache to litespeed. (Server = 1 gig ram, 2.4 ghz CPU, raid 0 disks) despite the fact that I'm setting max. child php threads to 60 and launch the site, the ram is being consumed minute by minute until it's all gone.
    A simple math;
    Every litespeed thread takes up about 7 mb's of RAM, times 60,
    7 X 60 = 420 MB of RAM should be used.(and this is true only at the start) I'm tracking RAM usage with top, the 7 mb part for each thread goes steady, however the total used memory is not!
    Is there a memory leak in this web server?
    TIA.
    ps: site is very loaded, about 1.2 million page views a day.
    ps2: server is also running tux(kernel based webserver),nothing else.
  2. xing

    xing LiteSpeed Staff

    sting,

    I'm not the developer so they can shed more accurate light on this but from what I know:

    1) LiteSpeed does not employ threads.
    2) By default PHP fcgi childs are handled by PHP's internal fcgi pool mech, not lsws. Lsws just open up and estabilish communication with php fcgi handler..

    Which platform are you using lsws on? Linux/FreeBSD/Solaris? What version of kernel? Which verson of LiteSpeed are you runing? Which version of PHP? Are you using any special PHP extensions not bundled with PHP such as turck-mmcache? These will help debug this problem for ya.

    Are you using Lsws bundled php package or a self compiled one? Output of phpinfo would be good to reveal any conflicts.

    Linux is very aggressive at used memory so if you have program that might use 5MB out of 2G sysstem, after a few days/hours of aggressive use of the HD, free memory will be 0 and total used memory will be 2G. This is because linux's buffer cache mech is extremely agressive and will use all available idle ram to cache file i/o.

    Hope everything works out.
  3. mistwang

    mistwang LiteSpeed Staff

    stingreen,

    Which version of LSWS are you using?
    Is the memory usage of lshttpd process keep growing or that of php processes?
    Can you please post your "top" output sorted by memory usage.
    Usually, lshttpd only use about 30MB at most, if the memory usage of lshttpd grows beyond that, it is likely caused by memory leaks.

    We just fixed a possible memory leack in 2.0RC3 when .htaccess is used. Is "Allow Override" enabled on your site?
    If you are interested, you can try our intrim 2.0RC4 release, which is very stable already.

    Best Regards,
    George

Share This Page