Skip to content

Possible Memory Leak? #2016

@igorescobar-moonpay

Description

@igorescobar-moonpay

Hi,

Is there any known memory leak issue with grpc-js + google-gax?

We have an application running on Nodejs 20 and we are trying to pinpoint what could be the root cause of this forever increasing memory consumption:

Image

We compared two memory heap dumps from this application, just a few hours appart:

Image

And you can see that all the hot paths are pointing to google grpc-js and google-gax. Zooming in a bit you can see it with more details:

Image

This NestJS application runs on Node20, the lib versions are:

  ├─┬ @google-cloud/[email protected]
   │ └─┬ [email protected]
   │   └── @grpc/[email protected]

This applications uses google-gax from the google-cloud/pubsub library. It has just one server with a flow control of 50 messages. Two listeners (subscriptions), two different topics that that's pretty much it.

Is there any guidance here that could help us to fix this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: pubsubIssues related to the googleapis/nodejs-pubsub API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions