PDA

View Full Version : PHP Memory Error


Lazorbeam
10-28-2011, 07:36 PM
I'm getting the following error when searching in vBulletin:

"Allowed memory size of X bytes exhausted (tried to allocate Y bytes) in (path) on line Z"

X = 134217728
Y = 20960
Z = 35
path = /home/stormsp1/public_html/consortium/wowhead/includes/wowhead_language.php

I took out the sizes and path as this makes this thread more searchable through Google (for anyone who runs into this problem in the future).

Now, I've searched for this error and it seems quite common. I have read about the php.ini fix and intend on going through with it, but I have some questions. The server I'm using is a VPS with 2GB+ RAM.
My server has plenty of RAM, why is it "exhausted" at 1GB (134217728 bytes)?
By adding memory_limit = 32M (arbitrary number) to php.ini, am I limiting the amount of memory available to 32M?
I'd be very grateful if someone could clarify all of that for me.

Thanks!

Zachery
10-28-2011, 08:01 PM
What are they searching for? FWIW: 134217728 = 128~mb. Your script is dieing around 128mb, it needed 20~kb more to finish.

Yes, that is the php memory limit per script execution. It looks like you're currently using the default 128mb script limit. You'd want to increase that to up more, like 135.