He says it works for one image, but not another. It looks like some imagemagick issue or cache being exhausted. But I am not sure what the error message actually means.
Its likely the script is trying, likely improperly, to create a huge intermediate image. ImageMagick first tries to create the pixel cache in memory. That fails so it tries allocating the pixel cache on disk. That fails so it tried the distributed cache. Since its not configured, ImageMagick gives up and throws an exception. Trace the script and find our where and why the image resource request is blowing up.