question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Memory overload with ts-node

See original GitHub issue

Confirm by changing [ ] to [x] below to ensure that it’s a bug:

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

image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Vahan23commented, Dec 24, 2019

Hey @ajredniwja can you please check your ram memory usage when you run some kind of code with aws-sdk with ts-node .

1reaction
Vahan23commented, Dec 19, 2019

Hey @ajredniwja , thank you for your answer, Type htop in your terminal, after press Shift + h , and filter the processes with F4.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found