Questions? Feedback? powered by Olark live chat software
Knowledgebase
Author Avatar

Fatal error: Allowed Memory Size of XXXX Bytes Exhausted

Written by: on 26 May 2016 11:24 PM 26 May 2016 11:24 PM

Getting fatal error due to reach your limit in PHP memory within cPanel? Follow our excellent guideline to fix such errors.

If you reach your limit in PHP memory within cPanel you will receive an error such as the following:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 481763851 bytes) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/zip_extension.lib.php on line 60

To fix this:

  • Login to your WHM installation (https://203.143.x.x:2087)
  • Browse to 'Service Configuration' -> 'PHP Configuration Editor'
  • Set the Core -> Memory Limit appropriately
  • Click 'Save'.

If you are doing a once off task that uses a lot of memory, you can set the Memory Limit to -1

This means there is no memory limit. It is recommended that you do not leave the setting like this as it will mean PHP can consume as much memory it likes which may lead to problems later on if you have any poorly written PHP scripts, or users doing the wrong thing. For general web serving from a MySQL DB the default Memory Limit of 32M is usually fine.

Note that PHPMyAdmin has a 2MB limit on database files, so if you are importing a database and receive that error, you should use SSH to restore your database, see: http://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/49/0/importing-a-large-mysql-database

(0 vote(s))
Helpful
Not helpful