Skip to content
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

Memory Leak in dd-trace http plugin #4286

Open
viral-barot opened this issue May 7, 2024 · 3 comments
Open

Memory Leak in dd-trace http plugin #4286

viral-barot opened this issue May 7, 2024 · 3 comments

Comments

@viral-barot
Copy link

viral-barot commented May 7, 2024

I have encountered memory leak issue in dd-trace package.
when I disable http plugin DD_TRACE_DISABLED_INSTRUMENTATIONS=http then there is no memory leak.

I have tried with upgrading and downgrading dd-trace package versions between 3.X to 5.X also tried different node version but still facing same issue.

node version : 18.17.1
dd-trace version : 5.10.0
restify version : 11.1.0

Memory Heap Snapshot

http plugin Disabled - Heap Snapshot.zip

http plugin Enabled - Heap Snapshot.zip

@viral-barot viral-barot changed the title Memory Leak in dd-trace http plugin Memory Leak in dd-trace http plugin May 7, 2024
@viral-barot viral-barot changed the title Memory Leak in dd-trace http plugin Memory Leak in dd-trace http plugin May 7, 2024
@sunsheeppoplar
Copy link

@tlhunter sorry for the tag, not sure the protocol for raising issues up to folks at dd... wondering if this is being looked at in the v4 and v5 lines

@SkylerRogers
Copy link

I am too having this issue. We're seeing elevated memory footprint in our node application after upgrading dd-trace npm package. Has anyone on the DataDog side been able to confirm this?

@ZeroCho
Copy link

ZeroCho commented May 21, 2024

for me, using cross-fetch instead of Native Node.js fetch solved memory leak. I guess something is wrong with dc-polyfill. Every fat span of continuous profiler is related with fetch code.

  1. waitForImage method calls 'fetch' which remains in memory even after waitForImage method ends and this span disappears if I replace it with cross-fetch
    image
  2. replicate use fetch internally and it remains in memory after finished. If I replace it with cross-fetch, this span disappears.
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants