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

fix: increase default listers on abort signals #484

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

achingbrain
Copy link
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
Copy link
Member

@SgtPooki SgtPooki left a comment

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
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
18 checks passed
@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