ImageMagick Not Responding - Memory Problem?
Posted: 2009-06-05T05:03:16-07:00
Hi there,
I've been running some very memory and processing intensive scripts, calling ImageMagick through both the PHP imagick function and also directly using the exec function (which is a direct execution of ImageMagick). Both these methods are necessary for what I'm trying to do. I'm actually creating several thousand 12" CMYK images at 300dpi, if you want to know.
Anyway, the script was working perfectly for a while, but ImageMagick has recently stopped responding. Interestingly it still works fine using imagick through PHP, but the direct calls using the exec function no longer work at all. Even simple calls no longer work. Nothing happens. Also, ImageMagick returns no error. I've tried restarting the server, this helped at first, but then the problem quickly occurred again. Now when I restart the server the problem still occurs.
I thought this was probably a memory problem, because of the way it was happening. I have 4GB of RAM on my server, so I increased the max memory on both the PHP script and ImageMagick configuration file to 2GB. No difference, the problem is still there.
This is not because I have changed anything on the server, and ImageMagick is correctly installed. It was all working perfectly before it just went wrong.
This must be something to do with memory or temporary files.
Please someone help!
I've been running some very memory and processing intensive scripts, calling ImageMagick through both the PHP imagick function and also directly using the exec function (which is a direct execution of ImageMagick). Both these methods are necessary for what I'm trying to do. I'm actually creating several thousand 12" CMYK images at 300dpi, if you want to know.
Anyway, the script was working perfectly for a while, but ImageMagick has recently stopped responding. Interestingly it still works fine using imagick through PHP, but the direct calls using the exec function no longer work at all. Even simple calls no longer work. Nothing happens. Also, ImageMagick returns no error. I've tried restarting the server, this helped at first, but then the problem quickly occurred again. Now when I restart the server the problem still occurs.
I thought this was probably a memory problem, because of the way it was happening. I have 4GB of RAM on my server, so I increased the max memory on both the PHP script and ImageMagick configuration file to 2GB. No difference, the problem is still there.
This is not because I have changed anything on the server, and ImageMagick is correctly installed. It was all working perfectly before it just went wrong.
This must be something to do with memory or temporary files.
Please someone help!