Hey, it seems there is a memory leak on Vix/Vips, probably on the Operation pipeline.
I've opened an issue on Image as I found the problem there initially, but after digging through the code, the problem is on Vix.
This is an example where the leak can be reproduced, it calculates the dhash of an image.
It can be saved to a file such as leak.exs on the root and run as mix run leak.exs.
Note that the memory usage increases and it isn't reported by the Erlang carriers, which points to a leak on the NIFs. It also greatly surpasses the reported cache size on Vix.Vips.tracked_get_mem/1.
Hey, it seems there is a memory leak on Vix/Vips, probably on the Operation pipeline.
I've opened an issue on Image as I found the problem there initially, but after digging through the code, the problem is on Vix.
This is an example where the leak can be reproduced, it calculates the dhash of an image.
It can be saved to a file such as
leak.exs
on the root and run asmix run leak.exs
.Note that the memory usage increases and it isn't reported by the Erlang carriers, which points to a leak on the NIFs. It also greatly surpasses the reported cache size on
Vix.Vips.tracked_get_mem/1
.Also, it is never freed until the BEAM stops.