harlan-zw / unlighthouse

Scan your entire site with Google Lighthouse in 2 minutes (on average). Open source, fully configurable with minimal setup.
https://unlighthouse.dev
MIT License
3.68k stars 105 forks source link

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unpipe listeners added to [WriteStream]. Use emitter.setMaxListeners() to increase limit #121

Open louisthomaspro opened 1 year ago

louisthomaspro commented 1 year ago

Describe the bug

Hello, you made a wonderful product tool, thank you!

I don't know if it's intended but when running unlighthouse on https://unlighthouse.dev/ using CI, CLI or API, I got the below warning printed multiple times in the console:

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 finish listeners added to [WriteStream]. Use emitter.setMaxListeners() to increase limit

If guess it's coming from puppeteer. I don't have this warning when adding "--single-process" in puppeteerOptions.args. Can we get rid of this warning ? Is this just a warning and does not affect the scan results ?

Thanks

BennyAlex commented 10 months ago

@harlan-zw I also have this error in node 18. When i use --single-process it stucks at the start. (node:12576) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit

olivervorasai commented 3 months ago

maxConcurrency can also be used as a workaround instead of --single-process. I use 8 for my 8 core 16 logical cpu so unlighthouse doesn't slow my pc down to a crawl.

https://unlighthouse.dev/guide/recipes/improving-accuracy#reduce-parallel-scans