Possible memory leak?
-
After running the manual optimisation over approx. 200 images I noticed that all of my PHP-FPM threads had a much higher memory usage than before. Unfortunately, the memory usage then does not come down until the process is restarted. The pool is configured to use a static amount of threads and will cycle them after 1000 requests. I’m not sure if this is expected, or if there could be a memory leak in the code?
The clearing and destroying of the image should probably be added to the Exception handler in CompressX_Image_Opt_Method::compress_image_imagick_ex, but I don’t think this is the cause.
Also, while looking at the code I spotted this a couple of times – I think the error message should be “not support imagick” ?
if(!CompressX_Image_Opt_Method::is_support_imagick())
{
$ret['result']='failed';
$ret['error']='not support gd';
return $ret;
}
- You must be logged in to reply to this topic.