Linode Forum Index Linode Forum
Linode Community Forums
 


PHP memory error

Click here to go to the original topic

 
       Linode Forum Index -> Web Servers and Web App Development
Author Message
JRG



Joined: 01 Feb 2012
Posts: 2

Posted: Wed Feb 01, 2012 10:16 pm    Post subject: 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
Back to top  
hybinet



Joined: 02 May 2008
Posts: 1058

Posted: Wed Feb 01, 2012 10:50 pm    Post subject:  

[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.
Back to top  
JRG



Joined: 01 Feb 2012
Posts: 2

Posted: Thu Feb 02, 2012 7:58 am    Post subject: PHP error message  

We'll try your solution.
Thanks a lot.
Back to top  
john57



Joined: 09 Feb 2012
Posts: 3

Posted: Thu Feb 09, 2012 5:46 am    Post subject:  

32M is too low...

128M...
Back to top  
phyber



Joined: 15 Apr 2011
Posts: 8

Posted: Thu Feb 09, 2012 6:06 am    Post subject:  

john57 wrote: 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.
Back to top  
Guspaz



Joined: 26 May 2009
Posts: 1150
Location: Montreal, QC

Posted: Thu Feb 09, 2012 10:24 am    Post subject:  

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
Back to top  
jzimmerlin



Joined: 21 Jul 2010
Posts: 100

Posted: Thu Feb 09, 2012 11:34 am    Post subject:  

It's all relative. Mine's set to 16M, and it hosts a real-time web app.
Back to top  
 
       Linode Forum Index -> Web Servers and Web App Development
Page 1 of 1