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 warning

See original GitHub issue

Heyho,

I just installed markdown-pdf via npm install markdown-pdf -g on my laptop, and when using it, it tells me, there is a possible memory leak:

$ markdown-pdf myMarkdown.md
(node) warning: possible EventEmitter memory leak detected. 2 end listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at SeriesStream.addListener (events.js:252:17)
    at SeriesStream.Readable.on (_stream_readable.js:673:33)
    at SeriesStream.on (...\npm\node_modules\markdown-pdf\node_modules\series-stream\index.js:12:38)
    at SeriesStream.once (events.js:278:8)
    at SeriesStream.Readable.pipe (_stream_readable.js:486:9)
    at SeriesStream.pipe (...\npm\node_modules\markdown-pdf\node_modules\series-stream\index.js:22:30)
    at ...\npm\node_modules\markdown-pdf\node_modules\stream-from-to\index.js:101:25
    at ...\npm\node_modules\markdown-pdf\node_modules\mkdirp\index.js:47:26
    at FSReqWrap.oncomplete (fs.js:82:15)

Using windows7, node 5.10.1

Output looks fine and as expected.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:5
  • Comments:14

github_iconTop GitHub Comments

5reactions
dulgancommented, Jul 19, 2016

Same problem using OS X El Capitan (10.11.5), node 6.2.2 and mardown-pdf 7.0.0

2reactions
leon-anavicommented, Sep 18, 2016

Hi,

For the record: I am getting the same warning on Ubuntu 16.04:

$ markdown-pdf --version
7.0.0

$ markdown-pdf README.md 
(node) warning: possible EventEmitter memory leak detected. 2 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at SeriesStream.EventEmitter.addListener (events.js:160:15)
    at SeriesStream.Readable.on (_stream_readable.js:689:33)
    at SeriesStream.on (/usr/local/lib/node_modules/markdown-pdf/node_modules/stream-from-to/node_modules/series-stream/index.js:12:38)
    at SeriesStream.EventEmitter.once (events.js:185:8)
    at SeriesStream.Readable.pipe (_stream_readable.js:474:9)
    at SeriesStream.pipe (/usr/local/lib/node_modules/markdown-pdf/node_modules/stream-from-to/node_modules/series-stream/index.js:22:30)
    at /usr/local/lib/node_modules/markdown-pdf/node_modules/stream-from-to/index.js:101:25
    at /usr/local/lib/node_modules/markdown-pdf/node_modules/stream-from-to/node_modules/mkdirp/index.js:48:26
    at Object.oncomplete (fs.js:107:15)
(node) warning: possible EventEmitter memory leak detected. 2 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at SeriesStream.EventEmitter.addListener (events.js:160:15)
    at SeriesStream.Readable.on (_stream_readable.js:689:33)
    at SeriesStream.on (/usr/local/lib/node_modules/markdown-pdf/node_modules/stream-from-to/node_modules/series-stream/index.js:12:38)
    at SeriesStream.EventEmitter.once (events.js:185:8)
    at ReadStream.Readable.pipe (_stream_readable.js:541:8)
    at SeriesStream._next (/usr/local/lib/node_modules/markdown-pdf/node_modules/stream-from-to/node_modules/series-stream/index.js:42:8)
    at SeriesStream.pipe (/usr/local/lib/node_modules/markdown-pdf/node_modules/stream-from-to/node_modules/series-stream/index.js:25:10)
    at /usr/local/lib/node_modules/markdown-pdf/node_modules/stream-from-to/index.js:101:25
    at /usr/local/lib/node_modules/markdown-pdf/node_modules/stream-from-to/node_modules/mkdirp/index.js:48:26
    at Object.oncomplete (fs.js:107:15)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Memory leak
In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in...
Read more >
How To Detect and Prevent Memory Leaks
Memory leak is the gradual loss of available computer memory when a program repeatedly fails to return memory it obtained for temporary use....
Read more >
Memory leak detection - How to find, eliminate, and avoid
How can I detect a memory leak? The simplest way to detect a memory leak is also the way you're most likely to...
Read more >
Memory leak in C++ and How to avoid it?
The best way to avoid memory leaks in C++ is to have as few new/delete calls at the program level as possible –...
Read more >
Top 20+ Memory Leak Detection Tools for Java and C++
List and Comparison of the top Memory Leak Detection and Management Tools for Java, JavaScript, C, C++, Visual Studio on Linux, Windows and ......
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