Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Php.ini memory size limit with respect to physical [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
UltraLinuz
n00b
n00b


Joined: 24 Oct 2008
Posts: 26

PostPosted: Mon Jan 26, 2009 10:56 pm    Post subject: Php.ini memory size limit with respect to physical [solved] Reply with quote

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
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Tue Jan 27, 2009 2:50 am    Post subject: Reply with quote

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
View user's profile Send private message
Tekeli Li
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2009
Posts: 95

PostPosted: Tue Jan 27, 2009 10:47 am    Post subject: Reply with quote

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
View user's profile Send private message
UltraLinuz
n00b
n00b


Joined: 24 Oct 2008
Posts: 26

PostPosted: Thu Jan 29, 2009 8:51 pm    Post subject: Reply with quote

Thnx
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum