matthewwithanm / django-imagekit

Automated image processing for Django. Currently v4.0
http://django-imagekit.rtfd.org/
BSD 3-Clause "New" or "Revised" License
2.26k stars 276 forks source link

How to clear the cache? #520

Closed harshjadon9 closed 1 year ago

harshjadon9 commented 3 years ago

on my ubuntu VPS, I process thousands of images through django-imagekit.

My code

class Thumbnail(ImageSpec):
        processors = [ResizeToFit(1200)]
        format = 'WEBP'
        options = {'quality': 90}

Main_image = open('path/to/image.jpg','rb')
Preview_gen = Thumbnail(source=Main_image)
Preview = Preview_gen.generate()

but after few hundred processes it stops at:

Preview = Preview_gen.generate()

but after restarting the server it works fine for the next few hundreds

maybe it's related to caching so, how to clear the cache or any other solution

Edit: now it stuck even after a reboot, so I removed that particular image from the process and it worked reset of the image were processing as normal

IDK now, I guess its a problem with that particular image or caching...

vstoykov commented 1 year ago

I'm not sure about what is the problematic image that is causing the issue or what exactly is happening on your machine. Because you said that if you remove some particular image it is working this leads me to think that it's not django-imagekit related at all. The question was askend long ago and I hope that you found your problem. I'm closing the issue.