max value for memory_limit in php.ini ?

What is the maximum value I can set in php.ini? I've noticed that I have a php.ini file on a per-site basis. My Linode is a 512 and I'm not sure if I can assign all 512MB? There's about a dozen sites running on my Linode.

Thanks

6 Replies

As much as you like. However setting it to 512mb would mean a single php process could use all your ram and kill your server.

32mb is normally sufficient, some apps require 64mb and some really heavy image processors require up to 128mb

Thanks for the info.

I'm running a script that parses the DOM of some large html pages and this gives memory errors at 128MB. I doubled it and it seems fine …

You doubled it to 256mb? You might want a bigger linode you won't be able to process many concurrent requests using that amount.

What do you mean by concurrent requests exactly? It's a script that runs just for me, not a public site.

For a script only you run then it probably wont matter, concurrent requests is requests processing at the same time, so I wouldn't run two of those scripts at once.

Understood, thanks for your help.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct