Получаю предупреждение
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [Commander]. Use emitter.setMaxListeners() to increase limit
Когда активирую больше чем 6 модулей в app.module.ts . Как поднять лимит emitter.setMaxListeners() и где это нужно прописывать в приложении NestJs
Пробовал такой модуль, но это не помогает. предупреждение остается
EventEmitterModule.forRoot({
maxListeners: 100,
verboseMemoryLeak: true,
}),
Из --trace-warnings
(node:15455) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Commander]. Use emitter.setMaxListeners() to increase limit
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at _addListener (node:events:593:17)
at EventEmitter.addListener (node:events:611:10)
at /Users/maksimov/Documents/CEO/dashboard/dashboard-backend/node_modules/bull/lib/utils.js:39:14
at new Promise (<anonymous>)
at Object.isRedisReady (/Users/maksimov/Documents/CEO/dashboard/dashboard-backend/node_modules/bull/lib/utils.js:17:10)
at Queue.setWorkerName (/Users/maksimov/Documents/CEO/dashboard/dashboard-backend/node_modules/bull/lib/worker.js:14:8)
at Queue.setHandler (/Users/maksimov/Documents/CEO/dashboard/dashboard-backend/node_modules/bull/lib/queue.js:679:8)
at Queue.process (/Users/maksimov/Documents/CEO/dashboard/dashboard-backend/node_modules/bull/lib/queue.js:657:8)
at BullExplorer.handleProcessor (/Users/maksimov/Documents/CEO/dashboard/dashboard-backend/node_modules/@nestjs/bull/dist/bull.explorer.js:91:23)
at /Users/maksimov/Documents/CEO/dashboard/dashboard-backend/node_modules/@nestjs/bull/dist/bull.explorer.js:53:26
at MetadataScanner.scanFromPrototype (/Users/maksimov/Documents/CEO/dashboard/dashboard-backend/node_modules/@nestjs/core/metadata-scanner.js:34:31)
at /Users/maksimov/Documents/CEO/dashboard/dashboard-backend/node_modules/@nestjs/bull/dist/bull.explorer.js:50:34
at Array.forEach (<anonymous>)
at BullExplorer.explore (/Users/maksimov/Documents/CEO/dashboard/dashboard-backend/node_modules/@nestjs/bull/dist/bull.explorer.js:41:19)