-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[Bug]: Memory problem #33086
Comments
@FKlindt I tried to reproduce on Windows 11 Enterprise with |
@dgozman Thanks for checking! Given that the issue seems specific to my environment, would you recommend any particular steps I could take to troubleshoot further? I'd be happy to share a full repro if that helps. Do you suggest anything else I can try to isolate the problem before submitting the repro? |
@FKlindt Perhaps try running the UI mode with |
Just in support of the author I am facing the same issue, it started after upgrading to 1.48.0. I've been using the tool for over a year on the same machine/OS and never observed the UI crash with 'out of memory' previously, it's occurring after running just 2 or 3 larger e2e tests in UI mode. As far as I can see there is no increase in the number of chrome processes however memory usage on processes does seem to have increased compared with previous playwright versions for the same tests. No idea if this will be of any value but here is a simple test I used to compare on a clean install of
This doesn't push it to a crash but my actual tests when it fails are far heavier and longer running. On 1.48.0 -
On 1.45.3 -
There is clearly freeing of memory happening after the test finishes but it seems like the amount freed has reduced so maybe that is contributing to the issue? I could not see any difference that stood out comparing the output between versions with DEBUG=pw:browser enabled. |
I've also noticed that the memory usage ramps up significantly with each test, much like your example. For me, running multiple UI tests results in similar behavior—memory usage climbs test by test until the system crashes, even though this didn't happen in earlier versions like 1.45.3. It looks like this could be related to how memory is being freed or managed between tests in 1.48.0. I’ll keep monitoring and try running tests with different configurations, but it definitely feels like something changed with this version. Thanks for sharing your comparison—it helps confirm this issue! |
Also seeing 'out of memory' problems running a long running test since upgrading to 1.48.0. Rolled back to 1.47.2 and all OK again. I was just running from command line, so UI mode not in use here. Will try and find a repro.... |
Also facing this issue since upgrading this morning. |
Should be fixed by linked PRs. |
I've upgraded @playwright/test to v1.48.2 but the memory issue still remains. Environment |
I'm having the exact same behavior with the version 1.49 on a windows 2022 build server. |
I am on |
Yup, I'm facing this issue. It only happens when I'm in the UI, so I can 'live' with it. |
Version
Version 1.48.0
Steps to reproduce
Set up a new Playwright project.
Run the tests using npx playwright test --ui.
Observe the memory usage during test execution, especially on a machine with limited resources (e.g., 20GB RAM).
You should see the memory usage increase rapidly, especially if multiple tests are queued, leading to an "out of memory" error.
Expected behavior
The tests should execute normally without exhausting available memory. Chromium instances should close automatically after each test in UI mode, similar to non-UI mode, without building up in memory.
Actual behavior
Running tests in UI mode with npx playwright test --ui results in excessive memory usage. Chromium instances remain open after test execution, which causes the system to run out of memory (particularly noticeable on a machine with limited memory). This issue does not occur when running tests without UI mode, where Chromium instances close correctly after each test.
Additional context
The issue is only observed in UI mode. Running the same tests without UI mode does not cause high memory usage, and Chromium instances close as expected after each test.
my config.txt
Environment
System:
OS: Windows Server 2016 10.0.14393
CPU: (4) x64 Intel(R) Xeon(R) Gold 6248R CPU @ 3.00GHz
Memory: 13.43 GB / 20.00 GB
Binaries:
Node: 22.3.0 - ~\AppData\Local\nodejs\node.EXE
npm: 10.8.1 - ~\AppData\Local\nodejs\npm.CMD
IDEs:
VSCode: 1.90.2 - C:\Program Files\Microsoft VS Code\bin\code.CMD
npmPackages:
@playwright/test: ^1.48.0 => 1.48.0
playwright: ^1.48.0 => 1.48.0
playwright-chromium: ^1.48.0 => 1.48.0
playwright-firefox: ^1.48.0 => 1.48.0
The text was updated successfully, but these errors were encountered: