-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 leak with actix-web 2.0 and actix-rt 1.1.1 for hello world #1500
Comments
If everything is fine with |
actix/actix-net@1b4a117 was fixing a leak introduced in This would be a different leak that needs finding. |
Yeah. I can reproduce it. Will check where are all of those allocations comming from. |
Currently monitoring a leak-like issue in production myself that is likely this issue; it's managable for now and I wouldn't say anything needs yanking like rt v1.1.0 did. Certainly is worth immediate attention, profiling, and tracking down. Eager to see the results of your allocation investigation @Lesiuk. You got time to do this today? If not I can do so later. |
@robjtede I'm pretty convinced It's because of memory fragmentation and only happens with high number of concurrent connections (-c parameter). When running for 1 hour in a loop memory usage stopped increasing at 49.2 MB on my macboook pro and 32MB on my windows machine. For example when testing with 35 concurrent connections memory stopped increasing at 9.4 MB. I will confirm if It's really memory fragmentation using valgrind on linux VM (since It's not working well on osx and windows) tomorrow afternoon. @cdbattags it could be tested using custom global allocator which would increase bytes allocated counter in every execution of |
Valgrind shows small memory leak inside
But it's pretty minor (50 KB after 100 000 requests). Most of those 62 MB usage I had was memory fragmentation. (really allocated was only 12 MB). |
Not seeing evidence of memory leak on latest v3 beta code. As @Lesiuk said, this is probably just memory fragmentation. If further evidence is brought for latest code, will be happy to reopen. |
I tested the above code with just updating the dependencies and it still shows memory leaks on ArchLinux
I'm attaching KDE System Monitor screenshots Before Testing:- After Testing:- |
I also still can see the leakage after upgrading to the latest beta version. |
app data memory leak fixed in beta 2 |
Thank you!
… On 17-Aug-2020, at 5:28 PM, Rob Ede ***@***.***> wrote:
app data memory leak fixed in beta 2
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1500 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABY4ACPT7JQZMRJRAP2WW4DSBELQHANCNFSM4M5TIDXQ>.
|
LGTM |
Hi,
I'm running the basic hello world program from actix guide, and I see memory leak with each request, details below:
rustc --version:
rustc 1.43.0 (4fb7144ed 2020-04-20)
cargo --version
cargo 1.43.0 (3532cf738 2020-03-17)
Cargo.toml
src/main.rs:
Used
cargo run
to do debug build and run the server.Initial process memory consumption (rss) was 6.9 MB (6984 KB) on startup.
I ran the following load tests:
wrk -t12 -c400 -d10s http://localhost:8088
Result:
End of first run, memory of process(rss): 16468 KB
End of second run, memory of process(rss): 19108 KB
End of third run, memory of process(rss): 20512 KB
Expected behaviour: Memory consumption may increase, but should restore back to original levels
Actual behaviour : Memory consumption increases with each request but does not drop down even after running the server for over an hour.
Host platform: Mac OSX Mojave 10.14.5, Macbook Pro from which both server and client are run from separate terminals.
I looked through list of issues, and it was stated that there was a memory leak in actix-rt 1.1.0 which was fixed in 1.1.1, but I'm using this version and still get the memory leak. Please advise.
The text was updated successfully, but these errors were encountered: