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

Clean up inactive sessions #3166

Merged
merged 3 commits into from
Sep 10, 2024
Merged

Clean up inactive sessions #3166

merged 3 commits into from
Sep 10, 2024

Conversation

leszko
Copy link
Contributor

@leszko leszko commented Sep 9, 2024

Not cleaning up the sessions causes quite a big memory leak which in effect causes OOMKilled

It's an alternative approach to #3163 in which, instead of keeping the timestamp of the last usage, we add cleanup into the flow.

Note that I'm 100% we won't have some corner cases, like segment was returned with a delay and now we cannot find the session. Saying that, it should not crash anything. Also, I did quite a lot of local dev chain tests, so I think it should work fine.

My plan is to get it merged and then deploy to one region for some time to see if we see any regression.

Not cleaning up the sessions causes quite a big memory leak which in effect causes OOMKilled
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 62.50000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 57.38077%. Comparing base (eec6ed3) to head (e5d01b2).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pm/sender.go 0.00000% 2 Missing ⚠️
pm/stub.go 0.00000% 2 Missing ⚠️
server/broadcast.go 83.33333% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #3166         +/-   ##
===================================================
- Coverage   57.38905%   57.38077%   -0.00828%     
===================================================
  Files             92          92                 
  Lines          15841       15852         +11     
===================================================
+ Hits            9091        9096          +5     
- Misses          6142        6147          +5     
- Partials         608         609          +1     
Files with missing lines Coverage Δ
server/rpc.go 70.81712% <ø> (ø)
pm/sender.go 97.87234% <0.00000%> (-2.12766%) ⬇️
pm/stub.go 56.89655% <0.00000%> (-0.49475%) ⬇️
server/broadcast.go 79.97870% <83.33333%> (-0.06422%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eec6ed3...e5d01b2. Read the comment docs.

Files with missing lines Coverage Δ
server/rpc.go 70.81712% <ø> (ø)
pm/sender.go 97.87234% <0.00000%> (-2.12766%) ⬇️
pm/stub.go 56.89655% <0.00000%> (-0.49475%) ⬇️
server/broadcast.go 79.97870% <83.33333%> (-0.06422%) ⬇️

Not cleaning up the sessions causes quite a big memory leak which in effect causes OOMKilled
@leszko leszko marked this pull request as ready for review September 9, 2024 12:10
@leszko leszko requested review from thomshutt and mjh1 September 9, 2024 12:10
@mjh1
Copy link
Contributor

mjh1 commented Sep 9, 2024

Simple enough change at least 👍 but yep sounds good on monitoring one region first

@leszko leszko merged commit 45652c4 into master Sep 10, 2024
16 checks passed
@leszko leszko deleted the rafal/fix-memory-leak-2 branch September 10, 2024 13:35
leszko added a commit that referenced this pull request Sep 11, 2024
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

Successfully merging this pull request may close these issues.

2 participants