Today after updating the programs running on my server to the latest builds I was met with the following error presented by wordpress:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 79 bytes)
Upon doing the usual google, I discovered a few people have been having the same problem as myself. It is however a very easy problem to fix and although I found no actual answers on the net (obviously I didn’t look hard enough) I figured it out in the end. The problem is caused by scripts requiring more memory to execute than php has available to it. By default php limits itself to 8MB and usually that is enough with which to run most scripts, however either by some error of php or the new heavier than usual requirements of todays scripts sometimes 8MB is just not enough and as you can see in my example only 79 bytes extra where needed.
The fix is simple, find your php.ini file open it and find the Resource Limits section. Under that heading there is a line which by default says:
memory_limit = 8M ;Maximum amount of memory a script may consume (8MB)
All you need to do is change the 8M to 16M, I know that the problem is caused by scripts only needing a few extra bytes but its always nice to have a multiple of the original therefore I have doubled it, you needn’t do this changing it to 9M will fix the problem. Once you have made the changes save the file and exit then restart your server process which in my case is apache and the problem will be fixed and all your scripts will be working ![]()
Feel free to comment if you have any other questions about this topic.