Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added to [Worker] #7

Closed
trivikr opened this issue Jan 22, 2021 · 2 comments

Comments

@trivikr
Copy link
Contributor

trivikr commented Jan 22, 2021

I noticed this issue while running parallel-prettier on ~16000 files in aws/aws-sdk-js-v3#1949

System Information
  • Operating System: Amazon Linux 2 x86_64
  • Host type: c5.4xlarge (16 Virtual CPUs, 32.0 GiB Memory, 160 GiB SSD (EBS) Storage)
  • Node.js version: v14.15.4

Command run was equivalent to:

node --trace-warnings ./node_modules/.bin/pprettier --write **/*.{ts,js,md,json}
(node:697) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added to [Worker]. Use emitter.setMaxListeners() to increase limit
    at _addListener (events.js:390:17)
    at Worker.addListener (events.js:406:10)
    at setupSubscription (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/rxjs/internal/observable/fromEvent.js:38:19)
    at Observable._subscribe (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/rxjs/internal/observable/fromEvent.js:25:9)
    at Observable._trySubscribe (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/rxjs/internal/Observable.js:44:25)
    at Observable.subscribe (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/rxjs/internal/Observable.js:30:22)
    at MapOperator.call (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/rxjs/internal/operators/map.js:32:23)
    at Observable.subscribe (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/rxjs/internal/Observable.js:25:31)
    at FilterOperator.call (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/rxjs/internal/operators/filter.js:29:23)
    at Observable.subscribe (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/rxjs/internal/Observable.js:25:31)

The error appears around 16 times, equal to number of virtual CPUs.

@connor4312
Copy link
Member

Thanks for the issue. This is not particularly concerning if files are read faster than they are formatted. But I will take care of it.

@connor4312
Copy link
Member

Published in 2.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants