memory Leak Nodejs - Timedout requests
- Dominant language
- JavaScript
- Stars
- 280
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Description
we are using AWS Xray Nodejs SDK in one of our projects. This API makes call to different servies using Axios. Whenever downstream API calls get timedout we see memory spike. On taking the heap dump we found that the data of the API calls is still in memory as string. How can we fix this issue?
On disabling AWS by commenting lines below, there is no spike.
```
AWSXRay.captureHTTPsGlobal(require('http'));
AWSXRay.captureHTTPsGlobal(require('https'));
```
Contributor guide
Research direction
Start by reproducing the timed-out Axios downstream calls with AWSXRay.captureHTTPsGlobal enabled for http and https, then compare heap dumps with instrumentation disabled. Inspect the captured request data retained after timeouts; done means the retained API-call strings and associated memory spike no longer occur, with regression coverage for timed-out requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript, node.js
- Domain
- api, backend, observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100