Skip to content
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? #68

Open
asad-awadia opened this issue May 21, 2023 · 5 comments
Open

memory leak? #68

asad-awadia opened this issue May 21, 2023 · 5 comments

Comments

@asad-awadia
Copy link

asad-awadia commented May 21, 2023

Hello

I recently moved from 1.3.7 to 2.2.7 in roux-stream and now I am seeing a memory leak ?

Usage starts at around 100MB and keeps going up all the way to 500MB

Any idea what changed? or how to debug ?

@asad-awadia
Copy link
Author

@beanpuppy @torfsen

@asad-awadia
Copy link
Author

Screenshot 2023-05-21 at 11 35 17 AM

@torfsen
Copy link
Contributor

torfsen commented May 23, 2023

Hard to say without any code. Can you please provide a minimal working example?

Also, have you investigated the issue using one of the many memory debugging tools available? This StackOverflow post has many links to get you started.

@asad-awadia
Copy link
Author

@torfsen https://gist.github.com/asad-awadia/672b2106e99199d0dfc71be650ea373e here is the script i am using

Also, have you investigated the issue using one of the many memory debugging tools available? This StackOverflow post has many links to get you started.

No - I don't know rust. Have to use rust because it is the only language where there is a library to stream reddit comments firehose style

I ll see if i can find something helpful using those tools but having someone who actually understands rust would be very helpful

@asad-awadia
Copy link
Author

asad-awadia commented Jun 6, 2023

let (mut stream, join_handle) = stream_comments(
        &subreddit,
        Duration::from_secs(std::env::var("SLEEP").unwrap_or("30".to_string()).parse::<u64>().unwrap_or(30)),
        retry_strategy,
        Some(Duration::from_secs(30)),
    );

changing the sleep to something smaller such as 10 seems to have helped

maybe the incoming was too much for a 30 second sleep?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants