reqwest
reqwest copied to clipboard
Memory leak (possibly macOS network stack)
Executing this code adds 0.1 MB every 10 seconds when observing Activity Monitor. I had the same issues with Swift on macOS (before I rewrote my application in Rust) and start to believe it is somewhere down the network stack. Can anyone confirm this issue?
use reqwest;
use std::{thread::sleep, time::Duration};
fn main() {
// memory grows around 0.1 MB every 10 seconds
loop {
let _ = reqwest::blocking::get("https://jsonplaceholder.typicode.com/posts");
sleep(Duration::from_millis(10));
}
}
I have tested this with reqwest 0.11.3 with Rust 1.52.1 on Linux kernel 5.10.32 and I do not see a leak.
I can confirm that it’s not an issue on Linux. I have filled a Feedback report with Apple.
I also have this problem,macOS 11.5.2.
Apparently still an issue on Monterey and I have not received any updates on the filled Feedback (FB9076036).
See https://github.com/seanmonstar/reqwest/issues/1445