Pre-sale questions

Discussion in 'Install/Configuration' started by LiteSpeeder, Nov 30, 2008.

  1. mistwang

    mistwang LiteSpeed Staff

    I checked the server, for some reason, the memory limit for the lsphp5 processes was set to 256M regardless what is configuration value in php.ini and LSWS. We need to investigate more.
  2. LiteSpeeder

    LiteSpeeder New Member

    Ok... So when can you do it?
  3. mistwang

    mistwang LiteSpeed Staff

    trying to reproduce the problem in our lab.
  4. LiteSpeeder

    LiteSpeeder New Member

    Ok, waiting...
  5. mistwang

    mistwang LiteSpeed Staff

    OK, the puzzle is solved, the memory limit is inherit from lshttpd when PHP is not started in suEXEC mode, under cPanel/WHM plugin, cPanel set the memory limit to 256MB, so when lshttpd started from WHM plugin, all lsphp processes get 256MB memory limit. Even after you restart LSWS from web console.
    Once you stop LSWS and then start LSWS from command line, the higher memory limit will be applied.

    When PHP start in suEXEC mode, the higher memory limit are applied correctly.

    We will have this issue addressed in next bug fix release.
  6. LiteSpeeder

    LiteSpeeder New Member

    Can you please provide a fix for me? I need it.
  7. mistwang

    mistwang LiteSpeed Staff

    working on it.
  8. mistwang

    mistwang LiteSpeed Staff

    I have put latest 3.3.23 release package on your server, it works fine.
  9. LiteSpeeder

    LiteSpeeder New Member

    Yes, thank you!
  10. anewday

    anewday Moderator

    Talk about rapid service. :D
  11. [QT]bender

    [QT]bender New Member

    Hi guys. I think I need same patch too. We are having application that require memory limit higher than 256 MB and I have memory_limit set to 512, but scripts stop working at 256 MB of memory. I have used the following script to test this out:

    PHP:
    <?
    $begin getmicrotime();

    error_reporting(E_ALL);
    $mem_lim=ini_get("memory_limit");
    $num_iterations=$mem_lim-1;
    // increase memory limit
    #ini_set("memory_limit", "256M");
    ini_set("max_execution_time""60");
    echo 
    "memory limit set to $mem_lim<br>";
    echo 
    "max_execution_time set to " ini_get("max_execution_time") . "<br>";
    echo 
    "Building very long string ... <br>";
    flush();
    $array = array();
    for (
    $i 1$i <= $num_iterations$i++) {
    echo 
    "Adding 1M data ... ";
    add($array);
    echo 
    "[OK] Total: $i Mb<br>";
    }
    #echo "<br>[OK] Total: $i Mb<br>";
    $end getmicrotime();
    echo 
    "Execution time: "; echo $end $begin;

    function 
    getmicrotime() // {{{
    {
    list(
    $usec$sec) = explode(" ",microtime());
    return ((float)
    $usec + (float)$sec);
    }


    function 
    add(&$array)
    {
    $array[] = $str str_repeat("*"1024*1024);
    return 
    $array;
    }
    ?>
    Look forward to hearing from you.
  12. anewday

    anewday Moderator

    Just download 3.3.23 version

    * Fixed a bug that may cause lshttpd crash when access certain page via userdir format URL.
    * Fixed a bug that cause fixed 256MB memory limit on non-suEXEC lsphp processes when used with cPanel
    * Fixed a bug in RailsRunner.rb that causes compatibility problem with Rails 2.2.1
    * Fixed a bug in virtual host template when referencing $VH_DOMAIN.
  13. [QT]bender

    [QT]bender New Member

    Thank you for your quick response and fix, but unfortunately fix does not work for us. We have upgraded LSWS on four servers and have same issue. To clarify - we have not usign WHM/cPanel, we are using Plesk on our servers.

    The result is:

    Code:
    Adding 1M data ... [OK] Total: 152 Mb
    Adding 1M data ... [OK] Total: 153 Mb
    Adding 1M data ... 
    Fatal error: Out of memory (allocated 200802304) (tried to allocate 1048577 bytes) in /var/www/vhosts/..../httpdocs/2.php on line 32
    Hope this will be resolved too and keep up the good work.
  14. mistwang

    mistwang LiteSpeed Staff

    You can use the following script to dump the system resource limit for PHP process

    Code:
    <?php
    $limits = posix_getrlimit();
    
    print_r($limits);
    ?>
    
  15. LiteSpeeder

    LiteSpeeder New Member

    Hello again,

    I've been running LiteSpeed 3.3.23 for a while and i'm pretty happy with it. I'm curious about one new feature of LiteSpeed 4.0:
    How will it work? I tried to install and configure squid in the past but never managed it to work. I've a very busy vBulletin forum and lots of gif, flash files embedded in non-vbulletin pages. Do you suggest me to switch to LiteSpeed 4.0b3 and enable the caching? or should i wait for the stable version of lsws 4?
  16. jayjaybaby

    jayjaybaby New Member

    I'm interested in how this squid like caching works aswell.

    On another note though, I dont think the cache would work effectively for dynamic content so if you have a forum I dont think it would be worth switching an unstable beta version (especially if its a busy/popular forum), I would wait for a stable release of lsws 4
  17. LiteSpeeder

    LiteSpeeder New Member

    Yes, it's better to wait for a stable version. Thanks.
  18. LiteSpeeder

    LiteSpeeder New Member

    Can you give more information about this, please? I really would like to see a page which lists "File not found" errors.

Share This Page