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

Find out a cause of 'Possible EventEmitter memory leak detected' warning #8

Open
KimTaehee opened this issue Feb 10, 2021 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@KimTaehee
Copy link

재현:
app 종료시 아래와 같은 메시지 발생

(node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 finish listeners added to [File]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [File]. Use emitter.setMaxListeners() to increase limit
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
전체 로그
AdminController init start
Discord Bot init start
Server init start
{"message":"[    at Object.<anonymous> (/app/app.js:18:8] Application Start","level":"info"}
{"message":"[modules/discord/discord-bot.js:29:14] discord login with token: NzE1MjA4ODgzMTM1ODQwMzY4.XtNIFw.LkzJ7zucyfR5zoKXsSpZSoEzl90","level":"info"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
(node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 finish listeners added to [File]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [File]. Use emitter.setMaxListeners() to increase limit
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
(node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 31 finish listeners added to [PassThrough]. Use emitter.setMaxListeners() to increase limit
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
{"message":"[    at process.<anonymous> (/app/app.js:61:10] unhandeled rejection occured, TypeError: logger.on is not a function","level":"error"}
{"message":"[    at finalize (/app/app.js:32:10] Finalize start","level":"info"}
{"message":"[    at finalize (/app/app.js:39:10] logger flush start.","level":"info"}
@KimTaehee KimTaehee added bug Something isn't working enhancement New feature or request labels Feb 10, 2021
@tkbro
Copy link
Contributor

tkbro commented Mar 17, 2021

#13
winstonjs/winston#1334
위 이슈 토의 내용에 transform 을 재사용하지 말라는 코드를 보고 수정하였습니다.
추가 확인은 필요할 듯 해보입니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants