PHP Variables - Memory Limit
PHP Variables - Memory Limit
This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server, but can result in blank pages displaying, errors on the site or in the Admin area and entries in the error log files like this:
Fatal error: Allowed memory size of x bytes exhausted (tried to allocate x bytes) in /path/to/php/script
You can increase the memory limit within the Platform, to do this first log in to the Platform and select the site from the dashboard. The PHP version is displayed on the site's dashboard and you can edit the PHP version and configuration by either selecting Upgrade PHP Version or PHP & Databases in the side menu.
The default memory limit is currently set to 128M, but you can change this by replacing the current value with a new one. Always end with M (short for MBs) and it is 'usual' to use 128M, 256M, 512M etc). When setting this value please bear in mind that you are allocating available memory on the server to a PHP script. If your server has 2GB memory and you set this value too high you run the risk of the server running out of memory and stopping some of the services from running therefore affecting all sites on that server. We suggest increasing this value in increments, start at 256M and test the site to see if that resolves the issue, if not try 512M and test again. 512M should be more than enough and if that doesn't resolve the issue then it may be worth looking elsewhere to troubleshoot.
Once you've entered the value click Update Configuration to save your change.
Updated 3 months ago