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.

Possible memory leak (dev mode)

See original GitHub issue

I’ve installed a fresh CLI blog locally and did many post updates within 1-2minutes. I saw that the memory went up quite fast (~200mb).

I’ve compared this without using the CLI and the memory was stable at around ~80mb 🤔

Last week or so i’ve imported a quite large database into the CLI and the memory went over 1GB. I’ve tried it without the CLI and memory was stable.

We need to investigate if this behaviour only happens in development mode. Furthermore we should figure out what’s going on.

Steps to reproduce

  • ghost install local
  • create posts
  • publish posts
  • update posts
  • get wild
  • look at the memory usage

Technical details

env: development Ghost-CLI Version: latest OS: mac os

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
acburdinecommented, Aug 13, 2018

We found what the issue was. Looks like setting NODE_ENV=development explicitly enables Bluebird’s debug mode, which is what was using all the memory. (see this link)

Closing this as any changes to fix this would need to happen in Ghost itself.

0reactions
kirrg001commented, Aug 13, 2018

I’ve debugged some more this morning.

If i comment out this line, the memory issue is gone 🤔

I have no idea why yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Possible memory leak for development mode standalone ...
I can confirm that this is happening in 2017.1.0f3. Shared UI Mesh keeps allocating memory rapidly in play mode until the Unity Editor...
Read more >
Fix memory problems - Chrome Developers
Learn how to use Chrome and DevTools to find memory issues that affect page performance, including memory leaks, memory bloat, and frequent ...
Read more >
Possible memory leak when v-for in development mode #8507
Looking into Google task manager, my app tab increases by ~2.400K each item I scroll down/up (each one is destroyed/created in the processes)....
Read more >
4 Types of Memory Leaks in JavaScript and How to Get Rid Of ...
Memory leaks are a problem every developer has to face eventually. Even when working with memory-managed languages there are cases where memory ...
Read more >
Debugging Memory Leaks in Node.js Applications - Toptal
Memory leaks in long running Node.js applications are like ticking time bombs that, if left unchecked in production environments, can result in devastating ......
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