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

Support Meteor 3 #93

Open
wants to merge 362 commits into
base: master
Choose a base branch
from
Open

Support Meteor 3 #93

wants to merge 362 commits into from

Conversation

leonardoventurini
Copy link
Contributor

@leonardoventurini leonardoventurini commented Feb 3, 2023

Remove fibers from the agent and integrate with Async Hooks and Async Local Storage.

@leonardoventurini
Copy link
Contributor Author

Milestone

Tests pass on Meteor's future release 3.0 branch

image

@leonardoventurini
Copy link
Contributor Author

Right now there is no way to know if a promise has been awaited or resolved in the background. What we can do is assume that an event which does not have other events in parallel has been awaited.

lib/tracer/tracer.js Outdated Show resolved Hide resolved
lib/tracer/tracer.js Outdated Show resolved Hide resolved
lib/tracer/tracer.js Outdated Show resolved Hide resolved
lib/tracer/tracer.js Outdated Show resolved Hide resolved
lib/tracer/tracer.js Outdated Show resolved Hide resolved
lib/tracer/tracer.js Outdated Show resolved Hide resolved
lib/tracer/tracer.js Outdated Show resolved Hide resolved
lib/tracer/tracer.js Outdated Show resolved Hide resolved
lib/ntp.js Outdated Show resolved Hide resolved
@@ -81,12 +80,6 @@ SystemModel.prototype.buildPayload = function () {
metrics.mongoPoolCheckedOutConnections = driverMetrics.checkedOut;
metrics.mongoPoolCreatedConnections = driverMetrics.created;

const fiberMetrics = getFiberMetrics();
Copy link
Member

@zodern zodern Jun 5, 2023

Choose a reason for hiding this comment

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

Would there be any async hooks/ALS metrics that would be useful instead? Can we track how many hooks or ASL stores are being used in the app?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can, will research.

lib/common/utils.js Outdated Show resolved Hide resolved
lib/common/utils.js Show resolved Hide resolved
lib/als/async-hook.js Outdated Show resolved Hide resolved
lib/als/async-hook.js Outdated Show resolved Hide resolved
lib/als/async-hook.js Outdated Show resolved Hide resolved
lib/als/async-hook.js Outdated Show resolved Hide resolved
lib/als/async-hook.js Outdated Show resolved Hide resolved
lib/als/async-hook.js Outdated Show resolved Hide resolved
@StorytellerCZ
Copy link

Tried the latest beta, but had to remove it as our containers started crashing with the following:

2024-12-20 16:23:29+09:00<--- Last few GCs --->
2024-12-20 16:23:29+09:00
2024-12-20 16:23:29+09:00[7:0x8348000] 1194098 ms: Scavenge 248.5 (257.8) -> 248.0 (257.8) MB, pooled: 4 MB, 1.95 / 0.00 ms (average mu = 0.208, current mu = 0.214) allocation failure;
2024-12-20 16:23:29+09:00[7:0x8348000] 1196407 ms: Mark-Compact 248.6 (257.8) -> 241.6 (257.8) MB, pooled: 4 MB, 2303.53 / 0.03 ms (average mu = 0.246, current mu = 0.283) allocation failure; GC in old space requested
2024-12-20 16:23:29+09:00
2024-12-20 16:23:29+09:00
2024-12-20 16:23:29+09:00<--- JS stacktrace --->
2024-12-20 16:23:29+09:00
2024-12-20 16:23:29+09:00FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
2024-12-20 16:23:29+09:00----- Native stack trace -----
2024-12-20 16:23:29+09:00
2024-12-20 16:23:29+09:00 1: 0xe19de0 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
2024-12-20 16:23:29+09:00 2: 0x1240390 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
2024-12-20 16:23:29+09:00 3: 0x1240667 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
2024-12-20 16:23:29+09:00 4: 0x146e1a5 [node]
2024-12-20 16:23:29+09:00 5: 0x146e1d3 [node]
2024-12-20 16:23:29+09:00 6: 0x148728a [node]
2024-12-20 16:23:30+09:00 7: 0x148a458 [node]
2024-12-20 16:23:30+09:00 8: 0x1cc5791 [node]
2024-12-20 16:23:32+09:00Application exited with signal: aborted

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.

6 participants