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

(node:11892) Warning: Possible EventEmitter memory leak detected. 11 notification listeners added. Use emitter.setMaxListeners() to increase limit #40

Open
chinaWangXianRong opened this issue May 26, 2017 · 4 comments

Comments

@chinaWangXianRong
Copy link

开发的时候时不时地报这个警告,这个警告是Events模块中的,根据提示,是监测notification 这个的,但是我没有监测,搜索整个项目是nodezookeeperdubbo中有

而默认是10个监听器,我问下怎么设置监听器啊
如果我的想的有问题,望指正

@chinaWangXianRong
Copy link
Author

` }
if (this.childWatchers[watcherEvent.path]) {
emitters.push(this.childWatchers[watcherEvent.path]);
delete this.childWatchers[watcherEvent.path];
}
break;
default:
throw new Error('Unknown event type: ' + watcherEvent.type);
}

if (emitters.length < 1) {
    return;
}

event = Event.create(watcherEvent);

emitters.forEach(function (emitter) {
    emitter.emit('notification', event);
});

};`

@chinaWangXianRong
Copy link
Author

在文件WatcherManager.js中

@omnip620
Copy link
Owner

omnip620 commented May 28, 2017

这个是依赖库里面的代码 一般情况下 只要dubbo和nzd的配置没问题的话 是不会报错的 建议检查下各项配置参数

@chinaWangXianRong
Copy link
Author

chinaWangXianRong commented May 31, 2017

{
            application:{name:'rd-web'},//应用信息,用于计算依赖关系
            dubboVer:'2.5.3',//dubbo版本
            root:'dubbo',//注册到zk上的根节点,默认为dubbo
            register:'192.168.8.111:2181',//zookeeper地址
            dependencies:{//接口依赖
                HomeService:{interface:'com.mmia.rd.common.service.HomeService',timeout:1000},
                SolrService:{interface:'com.mmia.rd.common.service.SolrService',timeout:1000}
            }

对吗 还是报那个

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