Build: [Warning] MaxListenersExceededWarning: Possible EventEmitter memory leak detected

Created on 4 Mar 2020  路  8Comments  路  Source: netlify/build

Describe the bug

As seen in this log at line time 3:16:09 PM:

(node:1262) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 data listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit

Steps to reproduce

Running my infamous debug repo 馃槂

Expected behavior

Everything runs just fine. Wanted to give a heads up in the case this is not expected, so you can take a look at it.

Configuration

I did bump node from 10 to 12 to see if the warning was still there, just in case.

Screenshots

If applicable, add screenshots to help explain your problem.
image

bug

All 8 comments

Thanks for reporting @talves!

I can reproduce this issue: https://app.netlify.com/sites/stoic-payne-cbd2fe/deploys/5e5fb4be90ba688693b2d15d

Note that this only happens in the production CI, not when running the build locally (with Netlify CLI).

@ehmicky I thought the CLI was not on this version locally (v2.36.0)

image

yarn why @netlify/build
image

Let me install the latest version of the build and try it out.

@talves I can reproduce the bug even with the latest version.

If you regenerate the yarn.lock, you should get the latest @netlify/build (0.1.80 as I write this). @netlify/cli uses the following semver range: "@netlify/build": "^0.1.7". But your yarn.lock might hold this up.

@ehmicky I was just removing it now and just confirmed it works local without the warning messages. 馃榿

Good catch on the yarn.lock, I would have gotten there, but not that fast. Thanks.

I am looking into this issue but debugging it is currently hard because of implementation details summarized in #878. Thanks for following up!

Fixed in #949.

In a nutshell: we were not cleaning up some event listeners. This did have any impact except for a small memory leak and those logs being printed if a plugin had more than 10 event handlers (very unlikely in actual production code).

This was unfortunately not related to netlify/cli#717

Was this page helpful?
0 / 5 - 0 ratings