1

I ran into this rather annoying issue the other day; when a page tries to load it will just 'stop' half way through returning half a page to the end user. The exact error is shown below.

[03-Jul-2015 03:15:04 Europe/London] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 18996 bytes) in [path]/concrete/vendor/imagine/imagine/lib/Imagine/Gd/Image.php on line 602

I spoke to my host and they bumped up PHP's memory to 512M (which is a bit overkill) yet it still throws this error. I'm not sure if it's a memory leak in Concrete5 somewhere or if it is just the server that the site is hosted on.

Any suggestions are much appreciated.

Edit: Forgot to mention I'm running 1.7.4.2

Edit 2: For reference the exact function is imagecreatetruecolor()

FortuneCookie101
  • 505
  • 1
  • 7
  • 19
  • I ment that there is not enough info. Somehere there is a image gen/manipulated by php-gd and you run out of memory. I would recommend either checking the code where imgs are gen'd, and debugging/profiling via xdebug if theres no obvious codepoint to check. – birdspider Jul 03 '15 at 09:21
  • 1
    Are you sure that your host has correctly changed your memory limit? 134217728 == 128M, not 512M. What does phpinfo() say? – Joseph Redfern Jul 03 '15 at 12:42
  • What does this code print? `var_dump(ini_get('memory_limit'), ini_set('memory_limit', '512MB'), ini_get('memory_limit'));` – Álvaro González Jul 03 '15 at 12:43
  • I'm not entirely sure the web host was honest with me... when I wrote this question they assured me that the limit was set (I even asked if they had restarted the service) but suddenly when I try it now, it magically works fine. I guess they didn't restart apache when they said they did. – FortuneCookie101 Jul 03 '15 at 12:47
  • That's something you can verify yourself. Perhaps you don't even need to ask your host to change it. – Álvaro González Jul 03 '15 at 13:00

1 Answers1

0

Either:

ini_set('memory_limit','256M');

Inside PHP or getting your host to bump up the memory limit will do the trick.

FortuneCookie101
  • 505
  • 1
  • 7
  • 19