Jump to content

Apache Memory Usage reach the limits after upgrade to 1.4.7.0


Recommended Posts

Hi nmaria,

In this situation, the best thing to do would be to contact your hosting provider, as they would be the best ones to identify any server issues. Additionally, a good hosting provider would be willing to increase that memory limit for you to get the site working again very easily.

 

I hope this helps.

 

-Mike

Link to comment
Share on other sites

Hi Mike,

 

Thanks for your reply.

 

In the beginning, with the "old" prestashop version i used a shared hosting with 128 mb ram for my server and almost everything goes fine (only have problems somethimes with many users or with uploading csv lists of products) after the upgrade to the new prestashop version the server goes down with a minimal of use (some searches with a couple of users was enought to cause problems).

So i upgrade to a new server, now this server is dedicated and managed by me. And now i see that the apache memory use is about 500 mb with a minimal use of the site !!!! This is huge !

 

Waiting for your reply

Thanks in advance and for all your help.

Link to comment
Share on other sites

Hi Mike,

 

The error log is full by this entries:

 

[Wed Apr 11 23:15:20 2012] [error] [client 000.000.000.000] PHP Notice: Undefined variable: header in /var/www/vhosts/"my site"/httpdocs/tools/smarty/sysplugins/smarty_internal_data.php on line 291

 

And also some of this:

 

[Wed Apr 11 23:08:05 2012] [error] [client 000.000.000.000] File does not exist: /var/www/vhosts/"my site"/httpdocs/js/jquery/jquery-1.4.4.2405ff2b9b4107, referer: http://"my site"/"my site private admin area"/index.php?tab=AdminPPreferences&token=d861860c6b909906439ac5662e1d4a4c

 

[Wed Apr 11 23:04:57 2012] [error] [client 000.000.000.000] PHP Warning: is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/var/www/vhosts/"my site"/httpdocs/"my site private admin area"/../translations/..) is not within the allowed path(s): (/var/www/vhosts/"my site"/httpdocs/:/tmp/) in /var/www/vhosts/"my site"/httpdocs/"my site private admin area"/tabs/AdminInformation.php on line 313, referer: http://"my site"/"my site private admin area"/index.php?tab=AdminStores&token=1792f60c5c295a84dab775d78153f118

 

The 000.000.000.000 ip's are edited and also the "my site" url and "my site private admin area" directory name.

 

Many thanks.

Link to comment
Share on other sites

Hi,

 

I think the file is like the original from ps distribution:

 

286 if ($this->smarty->error_unassigned && $error_enable) {

287 throw new SmartyException('Undefined Smarty variable "' . $_variable . '"');

288 } else {

289 if ($error_enable) {

290 // force a notice

291 $x = $$_variable;

292 }

293 return new Undefined_Smarty_Variable;

294 }

 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Hi nmaria,

Can you please try turning open_basedir off on your server and let me know if that works any better for you?

 

-Mike

 

Hi Make,

 

Nothing change with open_basedir off :(

 

I still getting :

 

Tue Jul24 09:59:37 2012 [error] [client 00.000.00.000] PHP Notice: Undefined Variable: header in /var/www/vhosts/xxx/httpdocs/tools/smarty/sysplugins/smarty_internal_data.php on line 291

 

Any ideias ?

 

Thanks

Link to comment
Share on other sites

Hi nmaria,

 

The error you describe is due to an undefined variable called "header" somewhere in your theme. Have you tried using the standard PS theme to see if this functions correctly. If it does you need to look through the code of your customized theme for where this variable is being called and assuming it has been properly assigned in php, pre-check in your template file that it is defined where you are calling it:

 

i.e. check for availabilty with {if isset($header)} The problem code you want to execute {/if}

 

You could also try switching off error reporting of notices in smarty to see if that helps:

 

$smarty->error_reporting = error_reporting() & E_WARNING & ~E_NOTICE;

 

I believe you can simply add this to smarty.config.inc.php after the line "global $smarty;"

But error notices really shouldn't cause your server to fall over.

 

However, I wonder is it more to do with a rogue database query: PS now uses innodb rather than myisam type tables as a default. It is possible that some tables have been converted from myisam to innodb after your last update and that an installed module or an override script contains a database query which performed fine with myisam but is now struggling with innodb.

 

You could try switching off all non standard PS modules and disabling any overrides to test, and if this resolves the problem switch them on one at a time until you find the problem.

 

You could alternatively use phpMyAdmin to convert all your tables to myisam if they are innodb or vice versa to see if this helps.

 

I would suggest ideally creating a duplicate of your site and database installing it under a password protected directory to test. Certainly at the very least back everything up before making any changes.

 

One last thing you could try checking is your hosting setup: if php is running under apache try changing it to fastcgi with safe mode off (important!). If you change to fastcgi you will also have to change permissions on any folders with 777 to 755.

 

Hope this helps. Good luck with solving your problem.

Edited by markb (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...