Skip to content

[BUG]: Memory Leak for temporal worker processes #5690

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

Open
mnahkies opened this issue May 9, 2025 · 1 comment
Open

[BUG]: Memory Leak for temporal worker processes #5690

mnahkies opened this issue May 9, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@mnahkies
Copy link

mnahkies commented May 9, 2025

Tracer Version(s)

5.51.0

Node.js Version(s)

22.13.1

Bug Report

Related: #5554

We've been experiencing memory leaks for our temporal worker processes. The last known "good" version of dd-trace for us is v5.28.0 - though we haven't exhaustively tried every patch version since then.

We're using the https://www.npmjs.com/package/@temporalio/interceptors-opentelemetry package to expose metrics from temporal, example annotation:

  podAnnotations:
    ad.datadoghq.com/energy-device-service.checks: |
      {
        "openmetrics": {
          "init_configs": {},
          "instances": [
            {
              "openmetrics_endpoint": "http://%%host%%:9464/metrics",
              "metrics": [
                "temporal_workflow_failed",
                "temporal_workflow_completed",
                "temporal_workflow_endtoend_latency"
              ]
            }
          ]
        }
      }

The process also runs a koa server exposing a couple of HTTP health check endpoints, and uses the prisma ORM with the normal node-postgres driver.

We don't observe memory leaks on our pure REST (koa) deployments or GCP PubSub deployments - leading me to believe that the leak is specifically related to the use of the temporal SDK.

I've said bundled using webpack, because I believe that temporal does bundle the workflow code using webpack. We don't configure/invoke any bundling ourselves.

Reproduction Code

No response

Error Logs

No response

Tracer Config

No response

Operating System

No response

Bundling

Webpack

@mnahkies mnahkies added the bug Something isn't working label May 9, 2025
@BridgeAR
Copy link
Collaborator

BridgeAR commented May 9, 2025

@mnahkies thank you for your report! We are going to look into this with high priority!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants