-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 [Bug]: Logger module causes OOM with ${bytesSent} and ${bytesReceived} #3060
Comments
@shell-skrimp Your example code says "fber/v3", but the errors say "fiber/v2". Which one is it? |
@gaby I've updated the sample to show the bug. The bug occurs when |
Does this issue still occur if you remove |
@efectn if I set that to |
ok then it is related to this line fiber/middleware/logger/tags.go Line 94 in 6968d51
|
I can confirm on main program when I omit or change |
@ReneWerner87 I believe that's the bug because it reads from the body without closing? |
Close is not really needed there. Its something else |
This also happens with |
@shell-skrimp Fix has been submitted for both Fiber/v2 and Fiber/v3 |
Bug Description
When download large files the process can be OOM'd. I have tried serving ~2GB ISOs and I've noticed that memory is not reclaimed.
How to Reproduce
Steps to reproduce the behavior:
curl localhost/isos/some.iso
33MB
RSS is used. Once I've downloaded a 2GB iso, the process is now using4128M
. If I download the file again, this amount of memory increases. Eventually the process is OOM'd.Download: true
(in static) andCacheDuration: -1
pprof (if it helps):
(-inuse_space)
(-alloc_space)
Expected Behavior
File should be served without OOMing.
Fiber Version
v2.52.4
Code Snippet (optional)
Checklist:
The text was updated successfully, but these errors were encountered: