bergebyn_
bergebyn_

Reputation: 51

AWS fargate: node js memory leak

I have a memory leak problem regarding a node js/express API running on AWS using fargate.

The picture says it all: memory usage of the container running the node app

This is kinda giving me a headache... I have tried using Jmeter and running the same requests against my local docker container and then used heap-dumps (chrome dev-tools) to find the issue without success. In the logs I have not found anything special happening around the times where the memory jumps in usage.

Some additional info: 1. There is no other request against the api during the periods where the jump in memory happens compared to when the memory usage lies stable 2. The api is connected to AWS RDS database(postgres) using library module: node-postgres

Would much appreciate any input on this, Thank you!

Upvotes: 4

Views: 2365

Answers (2)

bergebyn_
bergebyn_

Reputation: 51

Sorry for late update. The problem was that node itself was leaking memory. It resolved itself once i went from 12.16.0 to 12.16.4.

Additional info (look at the graphs and you will see the same pattern of the jumps in memory as the picture i posted): https://github.com/nodejs/node/issues/33266

Upvotes: 1

gvasquez
gvasquez

Reputation: 2017

Memory Utilization

Quite a similar scenario here both with Fargate and NodeJS, trying to diagnose it, I'll provide feedback ASAP

Upvotes: 0

Related Questions