PHP Imagick memory leak

后端 未结 4 704
庸人自扰
庸人自扰 2020-12-09 20:34

I have to render something with Imagick on PHP CLI. I have noticed that every 3-5 days the server memory gets full, so i can\'t even connet via ssh or ftp.

with memo

4条回答
  •  眼角桃花
    2020-12-09 21:22

    I know this is old but I ran into the same problem and calling $im->clear() instead of $im->destroy() fixed the memory leak for me.

    According to the documentation Imagick::destroy() has been deprecated in favor of Imagick::clear(). So clear() should be used.

提交回复
热议问题