Skip to content

fix: increase default listers on abort signals#484

Merged
achingbrain merged 1 commit into
mainfrom
fix/increase-default-listeners
Apr 9, 2024
Merged

fix: increase default listers on abort signals#484
achingbrain merged 1 commit into
mainfrom
fix/increase-default-listeners

Conversation

@achingbrain

Copy link
Copy Markdown
Member

To prevent spurious warnings appearing in the console, increase the number of listeners on created abort signals.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

To prevent spurious warnings appearing in the console, increase the
number of listeners on created abort signals.
@achingbrain achingbrain requested a review from a team as a code owner April 5, 2024 11:47

@SgtPooki SgtPooki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would really like us to get to a state where we can manage signals without needing to increase max listeners. But I would also like to be able to customize the max allowed in nodejs. 11 isn't very much and AFAIK there's no best practice for cascading signals like we deal with.

There is some really good discussion in nodejs/node#35990

@achingbrain

Copy link
Copy Markdown
Member Author

I agree it's a shame this is necessary but it seems unlikely to stop being so given that we have a top-level abort signal being passed into a non-trivial set of operations, all of which need to be torn down if the signal fires it's "abort" event.

I don't think node should emit this warning, evidence of a memory leak is memory going up and not coming down, not listeners being added to an event emitter.

@achingbrain achingbrain merged commit 7cd012a into main Apr 9, 2024
@achingbrain achingbrain deleted the fix/increase-default-listeners branch April 9, 2024 06:03
@achingbrain achingbrain mentioned this pull request Apr 9, 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