Skip to content

Memory leak with Node.js 20+ #2537

@leaveswoods

Description

@leaveswoods

Prerequisites

Environment check

  • I'm using the latest msw version
  • I'm using Node.js version 20 or higher

Node.js version

20.13.0

Reproduction repository

https://github.com/leaveswoods/msw-mem-leak

Reproduction steps

  1. Clone the repo: https://github.com/leaveswoods/msw-mem-leak
  2. Install Node.js 20
  3. Under test project root
  4. Run ./runMswMinimalTest.sh
  5. Check the logs for heap usage before and after the tests.

Current behavior

The heap usage is increasing significantly after test with msw even though

  • we force gc after test completed.
  • we close msw server in the end.

Expected behavior

The heap usage should not increase overtime with msw enabled.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds:triageIssues that have not been investigated yet.scope:nodeRelated to MSW running in Node

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions