I had this same issue with an image-heavy site hosted on WebFaction w/ PHP5.6, using latest Craft 2.6.x version.
I added the fix Brad mentions + another config line:
// From http://stackoverflow.com/a/12835966
// Pixel cache max size
$this->setResourceLimit(\Imagick::RESOURCETYPE_MEMORY, 256);
// Maximum amount of memory map to allocate for the pixel cache
$this->setResourceLimit(\Imagick::RESOURCETYPE_MAP, 256);
in craft/app/vendor/pixelandtonic/imagine/lib/Imagine/Imagick/Imagick.php
at line 33, at top of smartResize()
function.
This was before adding the 'generateTransformsBeforePageLoad' => true,
line to our config, I haven't tested removing this setting after adding that to our config.
When still in heavy development, we'd clear image asset caches and the transform queue would grow like crazy, and PHP processes would grow past 1.5gb until our host killed all of our processes. I haven't seen this issue since adding those Imagick settings.
craft/app/vendor/imagine/imagine/lib/Imagine/Imagick/Imagick.php
in thesmartResize
method. The syntax would be like:$this->setResourceLimit(\Imagick::RESOURCETYPE_MEMORY, 256);
, etc.