Coder Social home page Coder Social logo

Binance - MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket] about ccxt HOT 1 CLOSED

nvrossett avatar nvrossett commented on June 20, 2024
Binance - MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]

from ccxt.

Comments (1)

nvrossett avatar nvrossett commented on June 20, 2024

Please ignore it because I fixed it here:

In this post I saw a guy talking about npm doctor
https://stackoverflow.com/questions/76943688/maxlistenersexceededwarning-when-installing-or-creating-node-js-projects-on-maco

When I ran it here it asked me to update npm and node (even though my nodejs is recent)

$ npm doctor  
Check                               Value   Recommendation/Notes
npm ping                            ok       
npm -v                              not ok  Use npm v10.6.0
node -v                             not ok  Use node v20.12.2 (current: v20.5.1)
npm config get registry             ok      using default registry (https://registry.npmjs.org/)
git executable in PATH              ok      /usr/bin/git
global bin folder in PATH           ok      /home/nvieira/.nvm/versions/node/v20.5.1/bin
Perms check on cached files         ok       
Perms check on local node_modules   ok       
Perms check on global node_modules  ok       
Perms check on local bin folder     ok       
Perms check on global bin folder    ok       
npm WARN verifyCachedFiles Content garbage-collected: 54 (79820274 bytes)
npm WARN verifyCachedFiles Cache issues have been fixed
Verify cache contents               ok      verified 1020 tarballs
npm ERR! Some problems found. See above for recommendations.

npm ERR! A complete log of this run can be found in: /home/nvieira/.npm/_logs/2024-04-29T14_19_19_197Z-debug-0.log

So I updated node and npm here, and it worked.

When I ran it again but with nodemon, the problem appeared.

I had to update nodemon and then the problem disappeared

However, on pm2 the problem is still happening (always only on binance).

I updated but the problem continued.

Even though it is not recommended

I added:

const { EventEmitter } = require('events');
EventEmitter.defaultMaxListeners = 13;

13 was the best value to avoid errors.

I'll consider it closed for now because maybe a future pm2 update will solve it

After all, updating the node and nodemon cli solved the problem

from ccxt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.