-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Set Hexo's EventEmitter.MaxListeners to 100 #5504
Comments
IMHO it is not common to add 11 listeners on one event. |
Ok ... therefore the use of hexo.on("ready") and other events is limited in Hexo to 10, if you want to avoid those warnings. Correct? If yes, this limitation should be documented under hexo.io API |
This limitation comes from Node.js, not from Hexo. |
You are right. It is a Node topic, but Hexo runs under node and has to deal with it. Maybe it could be an option to introduce a config item for this? |
As I said, it is very rare to add 11 listeners on one event. In fact, in the 12 years of Hexo's history, you are the first one to see this warning. And since you already have access to |
Check List
Feature Request
I make heavy use of hexo.on("ready") and got now following NodeJS warning:
(node:16804) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ready listeners added to [Hexo]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
I set manually
this.setMaxListeners(100);
in constructor of hexo/index.js of Hexo class to avoid the problem, but it would be better to extend this in code base.Others
No response
The text was updated successfully, but these errors were encountered: