PHP memory error

My site is off and all got was this message:

[Thu Feb 02 02:04:09 2012] [error] [client 66.249.72.210] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261900 bytes) in Unknown on line 0

Some help will be very appreciated!

Thanks,

JRG

6 Replies

[Forget what I wrote here before, I misread the numbers.]

Edit your php.ini and increase your memory limit. 256K is too low. Try 32M.

We'll try your solution.

Thanks a lot.

32M is too low…

128M…

@john57:

32M is too low…
Based on what? You have no idea if 32M is too low or not without knowing what the application is doing.

PHP's default is 128M, so PHP scripts (at least those written after the default was changed to 128M) will assume they have that much memory to play with. 32M is indeed too low in that only 128M is going to be enough for some random app that assumes it has at least as much RAM as the PHP default.

That said, I think I have mine set at 64M :P

It's all relative. Mine's set to 16M, and it hosts a real-time web app.

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