Repository navigation
Timer objects no longer show up in process._getActiveHandles() #25806
Description
Activity
- added a commit that references this issue
on Jan 30, 2019 I think this is due to #20894 (#20894 (review)).
cc @nodejs/timers @nodejs/diagnostics
Yes, it is due to the aforementioned and related commits.
The tl;dr has apparently been that no one really cares about
_getActiveHandles(). This also broke some stuff internally at NodeSource at the time.
EDIT: to be clear, this is because all of the timer's work aside from the single base timer handle is now all done in javascript, and also detached form the handle for efficiency with V8.
See #21453 for a potential public version of this api, although really I think timers should maybe be a separate api, and continuations (nextTick, MTQ, setImmediate) an additional api still.
- addedtimersIssues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().Issues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().
on Jan 30, 2019 @Fishrock123 Thanks for the link.
The tl;dr has apparently been that no one really cares about
_getActiveHandles().I care :(
But yeah, it's always been a jank API. I'd be thrilled to see something better in that space.
What's the likelihood of getting Timers brought back in some fashion in
_getActiveHandles()? This seems like a bug to me.Reacted by mary marchiniThe tl;dr has apparently been that no one really cares about
_getActiveHandles().I care :(
I mean I'd like to say that I do too but it's been like 9 months. And, well, I want to get time to look at this again from a public api soon but, I say that a lot.
I think it is unlikely that anyone will want to change/fix/whatever
_getActiveHandles(). I don't 100% remember the context around the discussions at the time, though.I believe those APIs are mainly used by APMs vendor, we got the issue too at @keymetrics (keymetrics/pm2-io-apm#213) and found a somewhat fix
To add to this discussion, llnode has it's own getactivehandles/getactiverequest commands, and while upgrading llnode to work with Node.js v11 some tests stopped working because of this change.
- addedwontfixIssues that will not be fixed.Issues that will not be fixed.
on Feb 24, 2023 Given it has been 3+ years, at this point it seems like we should close and move on. Re-introducing is unlikely to add any value.
Hi, Having this feature can add a lot of value when there is a memory leak in an enterprise system due to increase in Active Handlers/Request. Hope the method is back.
Up until node v10,
process._getActiveHandles()would show Timer objects that were keeping the process open.For example:
However, in Node v11, this is not the case:
Is there a better or more canonical way to get insight into what's keeping the process from exiting gracefully? Or is this a bug?