Invision Forums - Memory Problem (Resources in red zone)

hello all Invision Forums - Memory Problem (Resources in red zone)

i hope i was descriptive enough so far as the title of the thread is concerned Invision Forums - Memory Problem (Resources in red zone)

My problem is that with seemingly manageable amount of users on site (at a time around 30-40) my invision forums generate too many errors Invision Forums - Memory Problem (Resources in red zone)

sample errors include (but not limited to):

> cant create a new thread (err 11) If you are not out of available memory, consult bla bla for a posible OS dependent bug.

> Error: My SQL has gone away
(This error is out of my mind really Invision Forums - Memory Problem (Resources in red zone) lol)

> allowed memory size os xxxxx exhausted, tried to allocate xxxxx bytes
(seems to be a PHP.INI issue. but i increased memory limit in PHP.INI to 32M .. no change Invision Forums - Memory Problem (Resources in red zone) )

When i login to my Virtuozzo power panel, the server resources are ALMOST ALWAYS in red zone.
Why in the world are my forums taking up so much resources?

and yea, i have tried optimizing the DB as well.

also commented out this portion of my class_session.php
Code:
        	else
        	{
    if ( $serverstats = @exec("uptime") )
    {
    	preg_match( "/(?:averages)?\: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/", $serverstats, $load );
    	
    	$ibforums->server_load = $load[1];
    	
    	if ($ibforums->server_load > $ibforums->vars['load_limit'])
          	{
            $std->Error( array( 'LEVEL' => 1, 'MSG' => 'server_too_busy', 'INIT' => 1 ) );
          	}
    }
  	}
i am no good at understanding PHP, but a similar problem (as mine) was posted by someone else, and one of the programmers here told him to comment out the line.

can anyone please help me on this issue?
PLZ!

Thx in anticipation Invision Forums - Memory Problem (Resources in red zone)

( WHY ME GOD!!? )


EDIT LATER:
Forgot to add one thing. one i tried to limit server resources in my AdminCP. i got this error on top of my board.

IPB WARNING [2] file_exists(): open_basedir restriction in effect. File(/proc/loadavg) is not within the allowed path(s): (/home/httpd/vhosts/xxxxxxx/httpdocs:/tmp) (Line: 58 of /sources/classes/class_session.php)

Line 58 (and two lines above and below it) of class_session.php
//-----------------------------------------
// Before we go any lets check the load settings..
//-----------------------------------------

(Below is line 58Invision Forums - Memory Problem (Resources in red zone)

if ($ibforums->vars['load_limit'] > 0)
{
if ( file_exists('/proc/loadavg') )
{
if ( $fh = @fopen( '/proc/loadavg', 'r' ) )
{
$data = @fread( $fh, 6 );

 

 

 

 

Top