I have a big php script that needs a gigabyte or more to run. I set the memory_limit in php.ini to 2048M. If I echo the limit with ini_get, I get the 2048M as expected. But when I run the script it fails and says that it could only allocate 512mb. I have 16GB of ram on the server, so its not that. There must be another limit set somewhere..?
Tell me more
×
Server Fault is a question and answer site for
professional system and network administrators. It's 100% free, no registration required.
|
migrated from stackoverflow.com Mar 13 '11 at 19:45
|
Don't know about any apache limits but I do know Linux supports setting resource limits for processes. Can't remember the exact details but one command involved is ulimit. |
|||
|
|
|
PHP, Webserver processes are also limited by the per process max memory limit. You'll have to ask an administrator to change the limit in this case. On linux/unix, you can check the limit with the following command in the shell:
or use PHP to check:
|
|||||
|