Skip to content

Conversation

@styfle
Copy link
Member

@styfle styfle commented May 15, 2025

This relates to...

There was a TODO introduced in a previous PR:

Rationale

There is a known memory leak

Changes

Track the number of origins per dispatcher, then clean up when that reaches 0 in order to avoid the memory leak.

You may not notice this memory leak if you don't fetch from many different origins.

Features

N/A

Bug Fixes

Breaking Changes and Deprecations

N/A

Status

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina
Copy link
Member

can you please merge main or rebase? Should fix CI

@styfle styfle force-pushed the styfle/fix-memory-leak-dispatcher branch from dea2cd2 to 7117600 Compare May 19, 2025 17:22
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@styfle
Copy link
Member Author

styfle commented May 19, 2025

Error: Cannot find module '../../deps/undici/src/index.js'

Hmm, the failure looks unrelated to my PR 🤔

@mcollina mcollina merged commit 59940c8 into nodejs:main May 20, 2025
29 of 31 checks passed
@github-actions github-actions bot mentioned this pull request May 20, 2025
@styfle styfle deleted the styfle/fix-memory-leak-dispatcher branch May 23, 2025 22:58
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.

3 participants