Reputation: 5240
(This is a very frequent error, but couldn't find the meaning.)
Fatal error: Allowed memory size of x bytes exhausted (tried to allocate y bytes)
I have some questions:
x
?y
? Sometimes it is a two-digits number.Thanks.
Upvotes: 1
Views: 5698
Reputation: 94844
memory_limit
configuration option. Note this may or may not agree with what the operating system thinks the memory usage of the script is at the time of the error.x
gives you the value of the memory_limit
configuration option. You can also assume that the server has at least enough virtual memory to handle the limit, but that's about it.y
is just the size of the straw that finally broke the camel's back.Upvotes: 6
Reputation: 806
This error is triggered because the PHP interpreter has a memory size limit for the scripts it runs. The "x" part is that limit, "y" is the allocation that caused the script to trigger the error. To override this, you can use either something like:
php_value memory_limit xxxM
in your server configuration or
memory_limit = xxxM
in the PHP configuration or
ini_set('memory_limit', 'xxxM');
in the script itself.
Upvotes: 0
Reputation: 48141
x = ini_get('memory_limit');
y = the php request that exceed that limit
The ram here isn't a problem, make a better php script or just rise memory_limit with ini_set
Anyway your question is a dup and a simple google search would solved it
Upvotes: 2