memory_limit
Posted: Thu Aug 10, 2006 11:30 pm
Hi All,
I would like to ask the memory_limit attribute in php.ini. From http://php.chinaunix.net/manual/en/ini.core.php, it said:
memory_limit integer
This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. In order to use this directive you must have enabled it at compile time. So, your configure line would have included: --enable-memory-limit. Note that you have to set it to -1 if you don't want any limit for your memory.
if i set to 32M, does it mean each script has a 32M maximum amount of memory to execute?
if twenty people access to different scripts simultaneously,
max. amount of memory consumes = 20 * 32M = 640M
is it right ?
if i set the memory_limit too high, is it lead to memory overflow easily?
I am using Sun ONE Web Server 6.1.
Thanks.
I would like to ask the memory_limit attribute in php.ini. From http://php.chinaunix.net/manual/en/ini.core.php, it said:
memory_limit integer
This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. In order to use this directive you must have enabled it at compile time. So, your configure line would have included: --enable-memory-limit. Note that you have to set it to -1 if you don't want any limit for your memory.
if i set to 32M, does it mean each script has a 32M maximum amount of memory to execute?
if twenty people access to different scripts simultaneously,
max. amount of memory consumes = 20 * 32M = 640M
is it right ?
if i set the memory_limit too high, is it lead to memory overflow easily?
I am using Sun ONE Web Server 6.1.
Thanks.