1

I am getting the following error on my Drupal site: Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 205668 bytes).

To be sure, 268,435,456 + 205,668 = 268,641,124 bytes = 256.2 MB.

In my php.ini I have memory_limit = 2G. I have verified that I am editing the correct php.ini file. When I xdebug the site and enter ini_get('memory_limit'); into the console, I receive 2G for the output. So I know my file is being read correctly.

I've also checked my .htaccess file to verify that there are no other memory directives in there. There are not. Where is this limit coming from?

John Alexander
  • 822
  • 1
  • 12
  • 21

2 Answers2

1

It turns out that this site has Drupal's path_memory module enabled, and the path I was trying to hit was configured to have a maximum of 256M available at admin/config/system/path-memory. Tricky.

John Alexander
  • 822
  • 1
  • 12
  • 21
0

1) You sir must have a ton of memory to apply 2 gigs for EACH HTTP/PHP process.

2) php memory_limit does not accept 'G' as a proper setting, make it 2048M instead How to increase memory limit for PHP over 2GB?

Community
  • 1
  • 1
Forbs
  • 1,256
  • 1
  • 7
  • 9
  • Ah, good to know. Changing it to `2048M` gives me the same error, topping out presumably at `256M`. This is trying to recreate a feature on localhost. – John Alexander Aug 30 '16 at 22:51