Memory overload with ts-node
See original GitHub issueConfirm by changing [ ] to [x] below to ensure that it’s a bug:
- I’ve gone though Developer Guide and API reference
- I’ve checked AWS Forums and StackOverflow for answers
- I’ve searched for previous similar issues and didn’t find any solution
Describe the bug when I run empty file with ts-node where I use aws-sdk, the memory is getting up to ~430-450 mb
import 'aws-sdk';
const run = () => {
setTimeout(() => {
console.log('123');
}, 100000);
};
run();
Is the issue in the browser/Node.js? Node.js
If on Node.js, are you running this on AWS Lambda? No
Details of the browser/Node.js version
node v10.16.3
ts-node v8.3.0
SDK version number v2.555.0
To Reproduce (observed behavior) Steps to reproduce the behavior (please share code or minimal repo) run this code with ts-node and check your memory usage
import 'aws-sdk';
const run = () => {
setTimeout(() => {
console.log('123');
}, 100000);
};
run();
Expected behavior
memory usage should be ~180 mb but it’s ~450mb Screenshots
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Possible memory leak when run under ts-node #337 - GitHub
I'm investigating a memory leak in a production app that seems to be related to this library, but I'm not sure if it's...
Read more >ts-node RAM consumption - Medium
It turns out that running ts-node-dev / ts-node is constantly consuming hundreds of megabytes of RAM even for small and simple applications.
Read more >How to solve memory heap error ts-node-dev? - Stack Overflow
During development, memory heap errors keep coming up and development is delayed. I set node memory to prevent this, but I don't know...
Read more >Node.js Memory Leak Detection: How to Debug & Avoid Them
Long story short, it's when your Node.js app's CPU and memory usage increases over time for no apparent reason. In simple terms, a...
Read more >How to Reduce RAM Consumption by X6 When Using ts-node
It turns out that running ts-node-dev / ts-node is constantly consuming hundreds of megabytes of RAM... Tagged with javascript ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @ajredniwja can you please check your ram memory usage when you run some kind of code with aws-sdk with ts-node .
Hey @ajredniwja , thank you for your answer, Type htop in your terminal, after press Shift + h , and filter the processes with F4.