You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
channelz support might have introduced memory leak #1958
Observe the Used Heap Space Size (Old space) for a few hours (in my case it's leaking ~15M/day)
Environment
OS name, version and architecture: [docker container x86_64 GNU/Linux Ubuntu 20.04.3 LTS]
Node version [v16.12.0]
Package name and version: @grpc-js@1.4.1, consumed by @nestjs/microservice@8.0.11 (same case for 8.1.2)
Additional context
This is the screenshot of the snapshot diff with 15 hours gap in between.
As the object stack indicates, the timestamp pushed into events array each time addTrace is called, it keeps adding new trace but is never garbage collected somehow.
According to the grpc version diff, the problem might be introduced by this commit: grpc-js: Add channelz support, when introducing the new object ChannelzTrace in server.ts after release of 1.4.0.
Is it something now should be disabled explicitly if not needed?
Thank you for the report. This was also reported in #1941, and as a result, I published grpc-js version 1.4.2 with hard limits on the number of retained channelz trace events per channel/subchannel/server, and support for the channel/server option grpc.enable_channelz, which can be set to 0 to disable channelz entirely. Please try it out to see if it solves your problem.
Activity
murgatroid99 commentedon Nov 3, 2021
Thank you for the report. This was also reported in #1941, and as a result, I published grpc-js version 1.4.2 with hard limits on the number of retained channelz trace events per channel/subchannel/server, and support for the channel/server option
grpc.enable_channelz, which can be set to 0 to disable channelz entirely. Please try it out to see if it solves your problem.sasaxing commentedon Nov 9, 2021
looks better. Thanks for the fast fix :)