-
Notifications
You must be signed in to change notification settings - Fork 652
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
channelz related memory leak (ServerHttp2Session) #2068
Comments
Ironically, it looks like the bug specifically caused a memory leak when |
Thanks a lot for the quick fix! Upgrading to 1.5.10 looks to have fixed the issue |
False positive, looks like there is still something lingering. Investigating to find more details, will recomment |
ServerHttp2Session is fixed and no longer being created but the memory leak for our system still exists. Will need to reopen or create another issue once I narrow down the source |
Problem Description
Upgrading from @grpc/grpc-js from 1.3.x to 1.5.x seems to introduce a memory leak
There seems to be an excess amount of ServerHttp2Sessions created (and unable to be freed)
We currently run a production service that has a single grpc-js server that creates multiple grpc-js clients. The clients are created and destroyed using lightning-pool.
Channelz is disabled when we initialize the server/clients as well with the
'grpc.enable_channelz': 0
Reproduction Steps
Create a single grpc-js server that calls grpc-js clients as needed from a pool resource. In our case, the server is running and when requests are made, we acquire a client via the pool (factory created once as a singleton) to make a request. These should be able to handle concurrent/multiple requests.
'grpc.enable_channelz': 0
for server/client options.Environment
Additional Context
Checking out some heap info, it looks like there is a lot of ServerHttp2Sessions created and being retained. The attached screenshot is the service running for about an hour with limited requests (just idling). I also have another snapshot where the service is running for much longer with many more objects created.
I also read through #1958 and #1941 which seems related but had no luck getting to a solution.
Happy to provide more context or help as neeeded.
The text was updated successfully, but these errors were encountered: