When accessing some pages on your site, running a Drush command on the server or in a cron job, you might face this error:
[09-Jul-2019 07:03:27 Europe/Paris] PHP Fatal error: Allowed memory size of XXXXXXXX bytes exhausted (tried to allocate XXXXX bytes) in /full/path/to/module/page.php on line 2703 request_id="v-0000zzzz-a1b2-0000-c3d4-2703zzd0907"This is usually due to PHP or Drupal not having enough resources to make the request. This means the global PHP memory limit is too low for a site which has overall higher complexity/rendering needs than a standard page.
As explained in the documentation "Conditionally increasing memory limits", some pages on your Drupal website (such as admin pages or reports) can require additional resources to run. Increasing these resources globally can decrease your website's overall performance.
As a short-term workaround, you can either:
settings.php that will allocate additional memory resources for a specific path or URL, or for Drush runs. Those snippets are listed in this documentation: "Conditionally increasing memory limits".
Longer-term, you should learn more about how your site uses PHP memory, and make adjustments appropriately. We recommend reading through this article: How to investigate Memory Consumption problems.
In summary:
See the article How to investigate Memory Consumption problems for more.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Wed Oct 22 2025 09:07:31 GMT+0000 (Coordinated Universal Time)