Repository navigation
Replies: 1 comment 1 reply
|
I disabled the SDK and the memory looks much better. Sadly just disable GraphQL didn't help much. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hey everyone,
I hope you're doing well!
After bumping to Node 22 (v22.22.0 and v8 12.4.254.21-node.33), we're running into memory issues in a Node API deployed into Kubernetes (not happening on another service running Node 18 in K8s). This API is predominantly GraphQL and uses Hapi under the hood, with the semi space size set to 16 and the pod limit at 1G. After some tuning and digging through heap snapshots, I can see the JSArrayBufferData growing by ~5MB every 10 minutes or so. When I look at the retainers, I can see some references to
http-exporter-transport.js,http-transport-utils.jsandAbstractAsyncHooksContextManager.js. I can also see the system context and MockHttpSockets growing. Some of this seems normal as the traces get exported to our configured exporter. I'm not a Node expert though so I could be interpreting incorrectly. I'm also not seeing any errors in the logs from the exports.To be clear, I'm not saying there's a memory leak here. I know there was a bunch of changes under the hood in Node 22 which have caused us other issues (for examples how closure memory retainment works). But I'm running out of ideas and I'm wondering if anyone can help me understand some good next steps as I suspect it's a configuration issue on our end. Happy to provide a heap dump if that helps.
Below is our versions of dependencies and our OTEL setup code. Any help is appreciated!
Setup code (enabled instrumentations is controlled by environment variables - GraphQL, MongoDB, Dataloader, Hapi, HTTP, Winston):
The span processor and span limits were me attempting to try and tune. This was happening with the defaults as well.
Dependency versions:
All reactions