-
Notifications
You must be signed in to change notification settings - Fork 12
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
High ram utilization #51
Comments
Hi there, Unfortunately, the We don't have any cache in the application, so the memory spikes would usually mean that that your server can't keep up with the load. That's happening due to when request is coming to the server the application will download a source image into the memory and sends it to the processor queue. There are several processors that are working in parallel ( Couple of questions I have:
Couple of things I would recommend:
Something we could do on our side is probably limit the amount of downloaded images we store and reject further requests (send Let me know how you go and we can look into this further. |
Thanks a lot for all the info and background! The one thing I worry about is growing memory footprint when nothing is happening. Let me run performance tests and see if there is no memory leaks around. I will also run remove in-memory cache of source images and run the tests again to see how memory footprint is doing. We do use the same version of this library to run SaaS offering and using the latest version and its been quite stable from memory prospective. But we horizontally scale it base on the load. One last question, do you use the docker image to run the service? |
You're welcome, actually thank you for the fantastic work. I used both this template I also always tried with Railway taking the project from git, but it seems to me that it does the same thing using docker. If I can help further let me know, |
Thanks for the prompt reply! Prob one last question that will help me to get on the right track. Are you source images are mostly PNGs or JPEGs? Or mix of both? |
I was able to reproduce the problem and got something going for the fix here: #52. The PR is almost ready codewise, but we'd need to do it a bit more testing to release it. I could push the image to Docker hub if you'd like to test it as well and see if it's fixing the problem? The problem is |
Ok I'll try it directly from the branch, I'll let you know. Thanks in the meantime. |
…-process #51: Checking if image is an illustration in separate process to prev…
Alright, I tested that one and the memory consumption never crossed 1Gb for me. There is a slight (+3%) increase in latency but gain in the memory usage worth it. Closing this one for now, but happy to re-open if the problem still exist. |
Hi, thanks for your contribution!
When I set the cache to 0, the system keeps keeping the memory full. What I want to achieve, considering that we use Cloudflare as a cache in front of the service, is to avoid storing images or otherwise always free up the available RAM memory. Once processed, these images will be available through the Cloudflare cache, so we do not need to keep storing. Our goal is to optimize and reduce these spikes in deployment.
Is there a solution to this?
Thank you
The text was updated successfully, but these errors were encountered: