---
title: "Errors in the PHP log"
date: "2025-05-02T18:17:36+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/92901-errors-php-log"
id: "a5697a7c-b7ad-4983-b486-6fa427a39e76"
---

Table of contents will be added

Issue
-----

I see errors in the PHP error log.  What do they mean?

Resolution
----------

PHP's error log is where you will find most of the problems caused by faults in PHP, whether those faults are caused by problems in the code itself, or by the code being unable to function properly due to other issues. Problems you might find include out-of-memory errors (OOM), undefined exceptions, and so on.

While you should ensure that the PHP error log is not overloaded with messages, it's also important to ensure that errors in the production environment are logged in case problems do arise. Failure to log these errors can cripple your ability to troubleshoot an issue. In most cases, disabling `NOTICE` messages is enough to keep the messages down to critical notifications. To suppress these, place this code into your `settings.php` file or if you are using Site Factory your `pre-settings-php` hook (see [Hooks in Site Factory](/node/57269)):

    if (isset($_ENV["AH_PRODUCTION"]) && $_ENV["AH_PRODUCTION"] == 1)
    { error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); }

See the PHP page on [`error_reporting()`](http://php.net/manual/en/function.error-reporting.php) for more examples. The method of suppression may change between PHP versions, so be sure to test if you update PHP.

Errors
------

    Allowed memory size of 134217728 bytes exhausted (tried to allocate 19600 bytes) in
    /mnt/www/html/sitename/docroot/modules/system/image.gd.inc on line 232

This is a memory exhaustion error and will cause a page load to fail. In this case, it's occurring in the Image module, but it can occur in a number of other modules. This error most often occurs when there's too much data or logic being processed for the standard amount of memory (128 MB) to handle. This is most commonly seen on administrative pages.

You have two possible approaches to this issue. You can troubleshoot the issue, or if you're an Acquia Cloud customer, you can increase your [PHP memory limit in the UI](/node/56299). While it may be easier to just increase your PHP memory limit, this can have negative consequences. Higher memory levels can reduce the number of available PHP processes for handling uncached page requests. As a result of that, you may need to resize your server.

Important

Acquia recommends troubleshooting the issue whenever possible, before increasing memory limits. In the event that you need to increase your memory limit, you may find the following Help Center articles useful:

*   [Conditionally increasing memory limits](/node/92621) - This can help you increase memory limits for particular processes.
*   [How to change the PHP memory limit](https://support.acquia.com/hc/en-us/articles/360004275694-How-to-change-the-PHP-memory-limit) - This article explains how to change memory limits in code.

Acquia recommends that you attempt to isolate the root cause of the higher memory usage, especially if the need for memory begins to exceed 192 MB or 256 MB. Beyond this point, there are usually code or configuration changes that would be more beneficial and cost-effective. If possible, determine what code or configuration changes may have taken place that could cause a jump in memory usage. This may not be the sole culprit, as many pages behave normally until a certain point.

If you need help with troubleshooting, you may find the Help Center article on [Memory consumption tracking tools](/node/92081)  to be useful.

Note 

Overriding this globally in the site's `settings.php` file is _not_ acceptable on Acquia Cloud because it creates a mismatch between the Acquia server's _expected_ limit compared to the _actual_ memory configured for your site, which can cause your server(s) to run out of memory if there is a traffic spike.

Look for resource-intensive queries, modules, views, or functions. Determine if anything has changed in the site's code or configuration that might have caused these alerts to suddenly appear.

Common buffer sizes
-------------------

For your reference, here's a table of common large buffer sizes that you may encounter in your site's PHP error logs:

Human Readable

Mathematical

Literal (PHP logging)

128 MB

227 bytes

134217728 bytes

256 MB

228 bytes

268435456 bytes

512 MB

229 bytes

536870912 bytes

1 GB

230 bytes

1073741824 bytes

4 GB

232 bytes

4294967296 bytes