New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory not being returned correctly #1246
Comments
Hi @sanvit! imgproxy forcefully runs garbage collection and However, even considering all these things memory graph is usually not this flat. It seems like your graph shows the container's memory usage. Containers tend to reserve some memory, and this is a normal behavior. |
Hello @DarthSim, First of all, thank you so much for your reply and your insight. I really appreciate your contribution to this project.
Is there a way to force-evict the cache? I'm trying to do everything I can in order to reduce memory usage inside the container if possible, as railway charges me for the exact memory the container is using.
As per this, I am not quite sure as I'm new to railway. However, my simeple django app didn't have this kind of issue (although it didn't really require that much more ram), so I think I'll need to dig a bit deeper. Anyways, thank you so much for your input, and I'll update this issue when I find something new. |
There's no way to do so. And I would not recommend doing it. Without cached buffers, imgproxy will have to allocate a new buffer for every image, and that buffer will use memory until the next garbage collection run. I would recommend you to try an alternative memory allocator. Try setting |
I'm trying to host imgproxy in railway.app. As you can see, after the spike in memory usage due to processing, the memory usage doesn't go down (the drop at the end is due to a forced restart of the container). Is there a way to force-flush the memory after each image processing or in an interval?
Below is my current env file just in case
The text was updated successfully, but these errors were encountered: