View previous topic :: View next topic |
Author |
Message |
UltraLinuz n00b
Joined: 24 Oct 2008 Posts: 26
|
Posted: Mon Jan 26, 2009 10:56 pm Post subject: Php.ini memory size limit with respect to physical [solved] |
|
|
Is there a recommendation for the memory size limit in php.ini (in relation to the amount of physical memory available)?
I run Gentoo on an Alix Board with 256 MB of memory.
It seems that the default is 128 MB but it sounds like a lot!
Quote: | memory_limit = 128M ; Maximum amount of memory a script may consume (128MB) |
Last edited by UltraLinuz on Thu Jan 29, 2009 8:51 pm; edited 1 time in total |
|
Back to top |
|
|
coolsnowmen Veteran
Joined: 30 Jun 2004 Posts: 1479 Location: No.VA
|
Posted: Tue Jan 27, 2009 2:50 am Post subject: |
|
|
That greatly depends on what you are doing, and how many concurrent operations you predict might occur. My only knowledge of this variable is that is can greatly limit the maximum file size that is able to be uploaded using php to a server. _________________ emerge: there are no ebuilds to satisfy "moo" |
|
Back to top |
|
|
Tekeli Li Tux's lil' helper
Joined: 03 Jan 2009 Posts: 95
|
Posted: Tue Jan 27, 2009 10:47 am Post subject: |
|
|
PHP Memory limit (which is per script) should be set according to the application needs, ie. maximum memory it would require under normal operation. From my experience 16-32 MB should be more than enough for majority of applications including Drupal, Wordpress, ...
In addition to this, and as coolsnowmen mentioned, it is related to max post size and therefore also max upload size, and should then be set as:
max memory >= max post size >= max upload size
Note that max memory is per script (per process, or per hit). So if you have 8 processes running with 32M limit each, that may come up as much as 256M total usage if you're running an application that requires 32M per hit (basic app needs + post/upload size). |
|
Back to top |
|
|
UltraLinuz n00b
Joined: 24 Oct 2008 Posts: 26
|
Posted: Thu Jan 29, 2009 8:51 pm Post subject: |
|
|
Thnx |
|
Back to top |
|
|
|