Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Potential Memory Leak #838

@aftershockdan

Description

@aftershockdan

We recently had a memory leak in our application that was causing heap out of memory errors and causing processes to crash. After some investigation it seems like there might be a memory leak from caused by this library. Once we removed the trace-agent lib the memory profile returned to normal. The offending src seems to be the endSpan function in ./node_modules/@google-cloud/trace-agent/build/src/span-data.js. I noticed a couple related issues, but that there was no clear resolution yet: #632, #603

Here is a screenshot of our heap profile:

screen shot 2018-08-10 at 12 18 59 pm

We are running a very simple express app with just a couple routes. The memory would very slowly build up overtime, over several days. If you need any other info please let me know. Hopefully we can track it down.

Versions:
@google-cloud/trace-agent: 3.0.0,
express: 4.16.3,
gke: 1.10.5-gke.3,
node: 8.11.3 alpine

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: cloudtraceIssues related to the googleapis/cloud-trace-nodejs API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions