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

feat: Gas escalator middleware #4211

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open

Conversation

daniel-savu
Copy link
Contributor

Description

Follow up to #3852 and #4098.

Since each escalator instance spawns a thread and we create transient providers for each message, this created a memory leak of escalator tasks that would build up over time - on RC, memory usage had reached 27gb before we noticed.

This PR merges in the changes from #4208 to stop the leak.

Memory profile before the fix (62mb peak usage):
Screenshot_2024-07-29_at_12 19 26

Memory profile after the fix (16mb peak usage):
Screenshot_2024-07-29_at_12 19 53

Drive-by changes

Related issues

Backward compatibility

Testing

Copy link

changeset-bot bot commented Jul 29, 2024

⚠️ No Changeset found

Latest commit: 68f90eb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented Jul 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.60%. Comparing base (0754d62) to head (68f90eb).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4211      +/-   ##
==========================================
+ Coverage   74.58%   74.60%   +0.01%     
==========================================
  Files         103      103              
  Lines        1515     1516       +1     
  Branches      195      195              
==========================================
+ Hits         1130     1131       +1     
  Misses        364      364              
  Partials       21       21              
Components Coverage Δ
core 84.61% <ø> (ø)
hooks 77.77% <ø> (ø)
isms 79.02% <ø> (ø)
token 89.07% <ø> (+0.06%) ⬆️
middlewares 77.58% <ø> (ø)

@daniel-savu daniel-savu changed the title Gas escalator middleware feat: Gas escalator middleware Jul 30, 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