PHP Memory Limit Error

Allowed Memory Size Exhausted Errors

Fatal error: Allowed memory size of 12582912 bytes exhausted (tried to allocate 23456789 bytes) in somefile.php
Fatal Error: PHP Allowed Memory Size Exhausted

These errors occur when PHP tries to process a large database record, or when importing or exporting a database.

To fix the problem, please modify the memory_limit line in php.ini to match this example:

memory_limit = 256M

We do set the maximum memory limit at 256 MB (268,435,456 bytes).

If you want to go higher, you will need a VPS plan or dedicated server.

So, if you see "Allowed memory size of 168435456 bytes exhausted..." in the error, then you cannot increase the limit any higher without a VPS plan or dedicated server. Dedicated Server and VPS customers with WHM access can change the limit by going to WHM > Service Configuration > PHP Configuration Editor.


Out of Memory Error

Fatal error: Out of memory (allocated 168435456) (tried to allocate 47 bytes) in somefile.php

If you see less than 168435456 bytes total allocated and being allocated, but still get an error like the example above, then we suggest you contact HostGator support to get assistance and advice.

  • 4 A felhasználók hasznosnak találták ezt
Hasznosnak találta ezt a választ?

Kapcsolódó cikkek

PHP Versions

PHP 5.3 for Linux Shared and Reseller Hosting PHP 5.3 is not the default version on all Linux...

How to run an MTR

MTR (My traceroute) allows you to constantly poll a remote server. This diagnostic tool combines...

Generating a CSR using cPanel

Please follow the instructions below to generate the CSR code in your cPanel account: Generate...

How To Set Up a Firewall Using FirewallD on CentOS 7

Introduction Firewalld is a complete firewall solution available by default on CentOS 7 servers....

How to open a port in the firewall on CentOS or RHEL

Out of the box, enterprise Linux distributions such as CentOS or RHEL come with a powerful...