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
Enabling MSW with no handlers and then load-testing using ab causes heap usage to balloon, even when manually invoking garbage collection.
As best I can tell, the largest percentage of retained objects are primarily:
MockHttpSocket
MockHttpAgent
I do not believe this is related to express, as only ClientRequest is intercepted, and I don't think express or http.createServer use ClientRequest, only IncomingMessage and ServerResponse (I could be wrong about that though).
Expected behavior
Memory usage should be stable under load when simply enabling MSW in a node application.
Prerequisites
Environment check
mswversionNode.js version
22.12.0
Reproduction repository
https://github.com/rossipedia/msw-leak-test
Reproduction steps
Instructions are in the reproduction repo, but they are essentially:
npm install./demo.shCurrent behavior
Note
This is a follow up to my colleague's issue #2390
Enabling MSW with no handlers and then load-testing using
abcauses heap usage to balloon, even when manually invoking garbage collection.As best I can tell, the largest percentage of retained objects are primarily:
MockHttpSocketMockHttpAgentI do not believe this is related to
express, as onlyClientRequestis intercepted, and I don't thinkexpressorhttp.createServeruseClientRequest, onlyIncomingMessageandServerResponse(I could be wrong about that though).Expected behavior
Memory usage should be stable under load when simply enabling MSW in a node application.