Pre-sale questions

mistwang

LiteSpeed Staff
#41
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.
 

mistwang

LiteSpeed Staff
#45
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.
 

LiteSpeeder

Well-Known Member
#46
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.
Can you please provide a fix for me? I need it.
 
#51
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.
 

anewday

Well-Known Member
#52
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.
 
#53
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.
 

mistwang

LiteSpeed Staff
#54
You can use the following script to dump the system resource limit for PHP process

Code:
<?php
$limits = posix_getrlimit();

print_r($limits);
?>
 

LiteSpeeder

Well-Known Member
#55
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:
squid like disk cache (almost done, will be availabe in Beta1 release)
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?
 
#56
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
 

LiteSpeeder

Well-Known Member
#57
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
Yes, it's better to wait for a stable version. Thanks.
 

LiteSpeeder

Well-Known Member
#58
5-) I can easily see 404 file not found error messages in apache's error log at cpanel. I think lsws' logging system is a little more complicated. How can i only display 404 file not found messages and fix the broken images, links etc at lsws?
We do not log all 404 file in the error log due to Ruby On Rail support. Right now, use a log analyzer or just scan access log should work.
Can you give more information about this, please? I really would like to see a page which lists "File not found" errors.
 
Top