Skip to main content
drupalreleases
Release: Libraries API 4.2.1 — Minor update available for module libraries (4.2.1). Release: Menu Link Attributes 8.x-1.10 — Minor update available for module menu_link_attributes (8.x-1.10). Release: Menu Link Attributes 8.x-1.9 — Minor update available for module menu_link_attributes (8.x-1.9). Release: Taxonomy Menu 8.x-3.9 — Minor update available for module taxonomy_menu (8.x-3.9). Release: Menu Item Extras 3.2.0 — Minor update available for module menu_item_extras (3.2.0). Release: Layout Paragraphs 2.1.4 — Minor update available for module layout_paragraphs (2.1.4). Release: PhotoSwipe - Responsive JavaScript Modal Image Gallery 5.0.11 — Minor update available for module photoswipe (5.0.11). Module Revived: Libraries API 4.2.0 — Module libraries updated after 11 months of inactivity (4.2.0). Release: RightUp 1.0.4 — Minor update available for module rightup (1.0.4). Security Coverage: Open Y Branch Selector — Module openy_branch_selector now has official Drupal security advisory coverage.

Memory limit policy

1,237 sites Security covered Drupal 9–11
View on drupal.org

This module allows you to dynamically change PHP's memory limit based on specific conditions, such as user roles, URL paths, or query parameters. It provides a user interface for configuring these overrides and offers built-in policies for common scenarios, with the ability for developers to create custom solutions.

Memory limit policy is a base module to override the default php memory_limit based on various constraints.

Some pages break because these are too heavy to generate? A user role has access to some interfaces displaying complex entities? With memory limit policy you can override the default php memory_limit for these situation only without doing it for all the pages. It provides a UI for non-developers to configure new memory overrides. Constraints can be combined to fit "complex" situation such as overriding the memory_limit only for one path, if it has a specific query argument and if the current visitor has a specific role.

This module comes with some default policies which can simply be enabled and configured:

  • Path: Apply the memory limit override based on the current path (wildcard support).
  • Role: Apply the memory limit override based on the current user's role.
  • Query: Apply the memory limit override based on the value of a query argument in the url
  • HTTP method: Apply the memory limit override based on the current request's HTTP method.
  • Route: Apply the memory limit override based on the current route's name.
  • Drush: Apply the memory limit override based on the drush command being executed.
  • Domain: Apply the memory limit override based on the domain (regex support).
  • Environment variable: Apply the memory limit override based on the value of an environment variable (regex support).

For developers, this module uses the plugin approach which means it is very easy to write your own plugin to fit your custom and specific case.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Apr 2023
Latest release
4 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
2.0.4 Stable 9–11 May 26, 2026
2.0.3 Stable 9–11 Jun 11, 2024
2.0.2 Stable 9–10 Jan 24, 2024
2.0.1 Stable Apr 5, 2023