Open asitemade4u opened 1 year ago
Here is the exact error message, as reported by R through Drone CI:
Error: R: cache resources exhausted `/mnt/stp/53a3fe8a467ddd70108a7e660362a29d/brooklyn-heights-0028.jpg' @ error/cache.c/OpenPixelCache/4095
I have tried to reduce the number of threads as per #346 and it did not work either.
Yes imagemagick uses a lot of memory. You can try calling gc()
to force a cleanup (although R should do this automatically every now and then), or explicitly call image_destroy(img)
to free memory of images that you no longer need.
THANKS @jeroen , gc()
seems to work fine -- I could treat the batch that was not working previously.
I will try with an even larger number of images and let you know.
Drone CI -> rocker container -> magick
tmp
folder to a folder on the host where there is plenty of space./etc/ImageMagick6/policy.xml
file within the rocker container to accommodate more memory (8 GB) and set the Magicktmp
folder to the folder mapped above.Nevertheless, after a certain amount of treated images, I get the
cache resources exhausted
error and the process stops abruptly.Any idea on how I can overcome the limitations and go through the process?
Thx, S.