mirror of
https://github.com/flyimg/flyimg.git
synced 2026-04-25 01:35:56 +03:00
[GH-ISSUE #476] are there any way to free RAM #779
Labels
No labels
Docs
Docs
Docs
Security
UnitTest
bug
dependencies
duplicate
enhancement
enhancement
enhancement
hacktoberfest
help wanted
invalid
pull-request
question
stale
version 1
version 2
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flyimg#779
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @francescor on GitHub (Jul 7, 2024).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/476
Originally assigned to: @sadok-f on GitHub.
we use it in docker swarm (6 replicas), and see containers start with 38M RAM, ...while after some time RAM easily reach the limit we set to 3G.
We have the feeling we are wasting RAM.
any suggestion on how to be sure all that allocated RAM is necessary?
@sadok-f commented on GitHub (Jul 7, 2024):
Thank you @francescor for opening this issue.
could you please specify more details about your environment (if possible a copy for your docker swarm file)
after how many days/weeks Flyimg's containers reach 3Gb? (we're running the demo page for over 2 weeks and the MEM Usage is ~400 Mb).
which Flyimg's version are you using?
how is the overall traffic you're receiving for the Flyimg instances?
Thanks
@francescor commented on GitHub (Aug 1, 2024):
sure, here is the stack file
@francescor commented on GitHub (Aug 1, 2024):
and the cited config file
@francescor commented on GitHub (Aug 1, 2024):
last 48 hours of RAM usage

@francescor commented on GitHub (Aug 1, 2024):
last 12 hrs here in cpu

@francescor commented on GitHub (Aug 1, 2024):
the RAM now is lower, indeed (users are in vacation), let me find some busy day with RAM spikes
@francescor commented on GitHub (Aug 1, 2024):
so, issues are raised by alarm from cadadviser on "memory", but I see several memory indicators:
so we probably have to ignore some of these indicators?
@francescor commented on GitHub (Aug 1, 2024):
in details:
memory_working_set_bytes(which we read is the one watched by OOM killer) is this one@francescor commented on GitHub (Aug 11, 2024):
@sadok-f any advice you can give us? even some links will be fine, then we'll dig and post here our feeds
@francescor commented on GitHub (Aug 11, 2024):
for exampla now the alarm for prometheus query:
is on for a flyimg container: it's docker stats return
That container started 2 weeks ago
@sadok-f commented on GitHub (Aug 12, 2024):
Sorry @francescor for not answering you, I'm currently on vacation until the end of August.
As soon as I get back I will check it out.
Thank you.
@sadok-f commented on GitHub (Aug 29, 2024):
@francescor just fyi, we're able to reproduce the issue and we're investigating it.
@sadok-f commented on GitHub (Aug 30, 2024):
Hi @francescor,
I just released a new version
flyimg/flyimg:1.4.7it contains a couple of enhancements and sets the php-fpm settingspm.max_requests = 50this should avoid memory leaks by restarting the PHP-FPM worker process after serving a certain number of requests (50)
Also I noticed you're using an old Flyimg version
image: flyimg/flyimg-build:1.1.56would be great if you could upgrade to the latest version and test your setup, probably you need to checkconfig/parameters.ymlfile as in the recent releases we introduced a couple of new options and changes.I'm looking forward to hearing back from you.
@francescor commented on GitHub (Sep 5, 2024):
I've just tried but had issue with the main page
Then this image https://s3-eu-west-1.amazonaws.com/static.opencity.opencontent.it/var/masullas/storage/images/3330-2-ita-IT/Homepage_header_logo.png was also rendered weird in our instance
while in your demo is perfect https://demo.flyimg.io/upload/o_auto,w_2500,h_2500/https%3A%2F%2Fs3-eu-west-1.amazonaws.com%2Fstatic.opencity.opencontent.it%2Fvar%2Fmasullas%2Fstorage%2Fimages%2F3330-2-ita-IT%2FHomepage_header_logo.png
I guess it is 'cause of some parameters we've added previously; I applied the changes for the new version
e.g.
@francescor commented on GitHub (Sep 5, 2024):
I did not clean the cache (or waited the default cron), but we are in docker swarm, so the deploy imply brand new container (with empty storage)
@sadok-f commented on GitHub (Sep 5, 2024):
@francescor it seems the CSS is not loaded properly, is Flyimg exposed externally? can you post the link here?
can you post here the image URL that caused this error?
Thanks!
@francescor commented on GitHub (Sep 7, 2024):
it was in production, but I had to revert to old version 'cause of those issues.
let me try to replicate to a dev version and give you the link
@francescor commented on GitHub (Sep 7, 2024):
the CSS issue is solved (it was due to a custom security header)
@francescor commented on GitHub (Sep 7, 2024):
We still have an issue with images like this one https://s3-eu-west-1.amazonaws.com/static.opencity.opencontent.it/var/masullas/storage/images/3330-2-ita-IT/Homepage_header_logo.png
Here a testing stack https://flyimg-test.boat.opencontent.io/upload/o_auto,w_2500,h_2500/https%3A%2F%2Fs3-eu-west-1.amazonaws.com%2Fstatic.opencity.opencontent.it%2Fvar%2Fmasullas%2Fstorage%2Fimages%2F3330-2-ita-IT%2FHomepage_header_logo.png
@francescor commented on GitHub (Sep 7, 2024):
Uh, this is interesting, the same image issue is in your demo.
https://demo.flyimg.io/upload/o_auto,w_2500,h_2500/https%3A%2F%2Fs3-eu-west-1.amazonaws.com%2Fstatic.opencity.opencontent.it%2Fvar%2Fmasullas%2Fstorage%2Fimages%2F3330-2-ita-IT%2FHomepage_header_logo.png
where when I use Firefox with my ordinary setting (not in private/anonymous mode) the image is rendered bad
and the console says
while if I use Firefox in private/anonymous mode, of Chromium, I have no problem and the image is rendered correctly (plus I do not get that console Content-Security-Policy errror.
@francescor commented on GitHub (Sep 7, 2024):
mah, I don't get it: now in my firefox I have two tab with exactly the same above link
and in one tab the image works (even with the CSP error, so that error is probably un-related), on the other one does not :(
I notice that, when the image is rendered correctly by Firefox, if I save it the extension is
.avifwhile when it is not, the extension in
.jpg@francescor commented on GitHub (Sep 7, 2024):
uh, with our current old version of flyimg (1.1.56), that image is rendered correctly, and when saved is a
.webpSo I guess I can solve just by disabling
avifand enablingwebp, am I correct?@francescor commented on GitHub (Sep 8, 2024):
so, it is just a matter of that "auto", since
this works (avif) https://flyimg-test.boat.opencontent.io/upload/o_avif,w_2500,h_2500/https%3A%2F%2Fs3-eu-west-1.amazonaws.com%2Fstatic.opencity.opencontent.it%2Fvar%2Fmasullas%2Fstorage%2Fimages%2F3330-2-ita-IT%2FHomepage_header_logo.png
this works (webp) https://flyimg-test.boat.opencontent.io/upload/o_webp,w_2500,h_2500/https%3A%2F%2Fs3-eu-west-1.amazonaws.com%2Fstatic.opencity.opencontent.it%2Fvar%2Fmasullas%2Fstorage%2Fimages%2F3330-2-ita-IT%2FHomepage_header_logo.png
while with auto https://flyimg-test.boat.opencontent.io/upload/o_auto,w_2500,h_2500/https%3A%2F%2Fs3-eu-west-1.amazonaws.com%2Fstatic.opencity.opencontent.it%2Fvar%2Fmasullas%2Fstorage%2Fimages%2F3330-2-ita-IT%2FHomepage_header_logo.png
In parameters we have
So, we've fixed this image rendering issue with (updated)
so
enable_webpis apparently not true by default https://flyimg.io/configuration/#enable_webpsorry for writing the above here and not in a new issue
@francescor commented on GitHub (Sep 9, 2024):
we are ready to deploy today's latest image in production, with S3 (too!), so I am confident the RAM will become less an issue: we'll deploy in the next 24hrs, and will let you know asap
@github-actions[bot] commented on GitHub (Oct 10, 2024):
This issue is stale (30 days with no activity)
@francescor commented on GitHub (Oct 18, 2024):
We've been in production with updated release, and it's much better.
It was
and now only one container was weird, but maybe an outlier
so this issue can be closed, thank you!
@francescor commented on GitHub (Oct 23, 2024):
We can confirm now the issue is definitively solved
Here the last 10 days with flyimg/flyimg:1.4.14
thank you!