-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
grpc-js memory leak #10418
Comments
Please provide a minimum reproduction repository (Git repository/StackBlitz/CodeSandbox project). |
@boolka why reproductions are required |
Was there any resolution to this? it seems it was just closed without comments, Looks like user had provided code to reproduce. We are noticing this in our staging environment, where health calls are constantly running, just starting the service and keeping it idle seems to have created a memory leak situation, the RAM is slowly piling up. |
I have the same issue, i have an app on k8s and when healthchecks are checked (through http with terminus and hybrid microservice), server gets memory leak so that at some point k8s is restarting the pod, we sticked with an old version previous to nestjs v8 (thats when it was switched to grpc-js). |
could this issue be reopened? @kamilmysliwiec ? now it has the code to reproduce. |
There's still no minimum reproduction repository in this issue. Please, create a new issue with a reproduction repository (that proves the memory leak really occurs of course). |
Is there an existing issue for this?
Current behavior
A lot of GRPC sessions are retained and are not garbage collected after responding to clients, as shown in the image.
Something related to
channelz
I suppose. It looks like I'm getting the same issue as in grpc/grpc-node#2068. I have upgraded to the latest version ofgrpc-js
and it's still not working.Minimum reproduction code
https://gist.github.com/tringuyencitigo/64a08c5790162483d98e2f638bfaaad9
Steps to reproduce
No response
Expected behavior
Memory consumption not gradually going up.
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
@grpc/grpc-js 1.7.1
NestJS version
@nestjs/microservices 9.1.2
Packages versions
Node.js version
14.17.0
In which operating systems have you tested?
Other
I'm happy to provide anything required.
The text was updated successfully, but these errors were encountered: