You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I wanted to get some additional information on how this warning is generated:
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 response:mocked listeners added. Use emitter.setMaxListeners() to increase limit
I have a page that makes several independent api requests on load and seems to throw this warning when this happens. When I only have 1 or 2 requests, this warning goes away. Can anyone explain how msw handles or adds listeners?
Is this truly an msw warning or does it come from the underlying framework?
Does msw create new listeners for every request that's made? (i.e., if I have 15 api requests, should I expect to have 15 listeners; even if the same endpoint is called more than once?)
Ultimately, I just want to ensure there's not a concern of memory leaks but wasn't sure where to look to validate.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I wanted to get some additional information on how this warning is generated:
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 response:mocked listeners added. Use emitter.setMaxListeners() to increase limit
I have a page that makes several independent api requests on load and seems to throw this warning when this happens. When I only have 1 or 2 requests, this warning goes away. Can anyone explain how
msw
handles or adds listeners?msw
warning or does it come from the underlying framework?msw
create new listeners for every request that's made? (i.e., if I have 15 api requests, should I expect to have 15 listeners; even if the same endpoint is called more than once?)Ultimately, I just want to ensure there's not a concern of memory leaks but wasn't sure where to look to validate.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions