Server Memory

Hi:



What is the recomended memory amount for the server running 3.04. We have the server run out of memory several times in the last 2 weeks, We switched the one website back to 2.5 version as that script seems uses less memory.



We have a dedicated server with 1 gb at this time.



Please let me know how much memory we should have one our server running 3 to 4 3.04 websites

Thanks

Check the memory settings in config.local.php in the root of your stores hosting, 1GB should be more than enough for the majority of stores, unless you have massive amounts of product option combinations or complex product filters. config.local.php sets amount of memory available for CS-Carts use, but this may also be limited to an extent by other files on your server, commonly php.ini.



If you log in to one of your V3 stores, Administration>Database>PHP Information. What values have you got for 'memory_limit'?

memory_limit Local 48M Master 32M

[quote name=‘jknapp’ timestamp=‘1359853296’ post=‘154317’]

memory_limit Local 48M Master 32M

[/quote]



If those are the figures from your php.ini file, then I am surprised your site is even alive & breathing! ;-)



As an example, we are set at 512M on the server and 256M in our config.local.php

He's talking physical mem of 1GB (not a lot to be running a current day server). Suggest you go with at least 4 or better yet, have someone analyze your system while it's running using vmstat. If you're running SMTP services or any anything else going on on your server, you're going to run out of memory pretty quickly.



The 'memory_limit' in config.local.php is a 'limit' for the PHP process. I.e. PHP will use up to that amount IF IT NEEDS IT and the PHP application (versus the server itself) will die when that limit is hit.



But 1GB of memory on a dedicated server would only be useful as file server or other non-application related activity.

[quote name='tbirnseth' timestamp='1359875246' post='154334']

The 'memory_limit' in config.local.php is a 'limit' for the PHP process. I.e. PHP will use up to that amount IF IT NEEDS IT and the PHP application (versus the server itself) will die when that limit is hit.

[/quote]

That's what I thought, hence memory size limit errors when doing heavy things like exporting all products if the memory limit is too low. I assume the server would take the lowest value between config.local.php and php.ini, for example, where php.ini is set to 512mb, but config.local.php is set to the 256mb, that PHP will only use 256mb. Would you set config.local.php memory size to the same as php.ini?

Any time you do an ini_set() you are replacing the php.ini value for the life of that process for that property.



Note that many shared hosting environments impose a limit on how high you set certain things like memory_limit and/or whether you can use zero for timeout (infinite). The set_time_limit() PHP function actually affects both PHP and Apache. But it is dependent upon the environment.

Good point, thanks for that Tony.