Replies: 1 comment
-
Please search for MaxListenersExceededWarning in this repo to get several issues discussing this same subject. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm getting the following warning
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added ...dist/cis/classes/redis-connection.is:131
to [Commander]. Use emitter. setMaxListenersO to increase limit.
To give you a context of what I'm doing. I have a class named Client which places jobs in a queue. Whenever a new job is added in the queue I return a promise.
Worker process the job and returns the result using a 'result' queue. A seperate worker (defined in client class ) listens for jobs in 'result' queue and whenver a job is processed it emits an event. The event is 'JobID' of the job that was dequeued. And a listener in the client class listens to it and resolves or rejects the promise based on it.
I'm reusing the redis connection in client class for queus and workers.
Beta Was this translation helpful? Give feedback.
All reactions