-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Tests causing CI agents to run out of memory on cypress 8.2 & above #17853
Comments
a note: in a much earlier version of cypress, we fixed this by adding "numTestsKeptInMemory": 1, to our cypress-ci.json, this may help if you're not already doing this |
I tried that and it is still failing with the same error. |
I can observe similar issues since 8.2 and higher. My AZURE pipelines just run until the pipeline timeout occurs once I upgrade above 8.1. On Cypress 8.1 everything works flawlessly |
Is everyone in this thread experiencing this issue in Azure only? |
Could anyone run Cypress in debug mode mode and print the entire set of logs here? |
I experience this when running cypress in aws codebuild too |
@jennifer-shehane I've got the same issue with 8.3.1 on Azure Linux agents:
|
I have an Agular project and using Cypress for e2e testing. I also have an issue with memory.
To reproduce the problem I made test project Platform: Ubuntu 20.4 |
Any updates? I wish I could upgrade from 8.1 as I can see significant performance boost but this issue forces me to be locked to 8.1 |
@stychu there is no such issue in 8.1? |
Tried to upgrade from cypress 7.2.0 to 8.6.0 and also found that the tests started consuming more resources from version 8.2.0 onwards (I pretty much tried all versions in between). Testing React App + cypress 8.5.0 + chrome 94 in a container in pipeline using AWS using m5.xlarge instance, (16 GB ram). switching to a m5.2xlarge (32 GB) makes test pass but this just hides the problem and locally the spec with quite a bit of tests just crashes chrome. Running headless, there's no log saying chrome crashed, cypress just hangs. |
@ikrasnikov Yes I run 8.1 without the issues. As long as I try to bump it up to 8.2 and above all tests hang out and timeout azure pipeline. |
@stychu thank you! But in my case did not help to decrease the version to 8.1. Still have the same issue after 390 test file. |
Any updates? Is it working ? |
Vadim's logs suggest that it's the plugins child process which is consuming memory, which is very helpful in at least giving us a place to start looking. It's very strange that this begins occurring between 8.1 and 8.2. If 8.2 ran but 8.3 had issues, there'd be a variety of possible culprits (starting with the bundled electron and node versions), but 8,2 doesn't have anything that immediately jumps out at me as a potential cause. 9.0.0 does contain an electron and bundled node version bump, it might be worth trying. It also now uses |
@BlueWinds, tried with version 9.0.0. No changes. Run fails on 295 test file. |
Thank you for the reproducible example! Having an easy way for us to reproduce issues is always the first step in figuring things out. 👍 @chrisbreiding - This is an ongoing issue I looked at last time and had to pass on because we didn't have good repro steps. |
@BlueWinds but have already posted this test project before, in my comment Sep 24 :) |
Yeah, I see it now. Lots of issues to keep up with and not enough time to give them all the attention they deserve. |
I have the same issue with a self-hosted Azure DevOps Agent. Fails after about 300 tests. Downgrading to 8.1.0 resolved the issue. Interestingly enough, this issue was not always there with this version. It appeared out of nowhere months after updating to 8.4 but was persistent ever since. |
Do we have any update on this will be fixed soon 😢 |
Appears to be related to: #15508 |
We have been stuck on 8.1 due to this issue. Can someone please prioritze this issue? |
Tried to update to actual versions
Pushed changes to the test project. |
This just started happening in my project, currently only in a particular PR so trying to troubleshoot it and came across this issue. One of the test runs (in Github Actions): This is the PR where this is happening (carbon-design-system/carbon-for-ibm-dotcom#8147), if it helps to see if a particular change is causing this. Our project was running fine on cypress v9.2.1 before this PR. Upgrading to latest version (9.3.1) didn't seem to help anything. |
If you want a solution for:
|
Thanks, I'm not using docker though, just running cypress tests on a node project in Github Actions. I can't upgrade node since our project has some dependency limitations at the moment. I tried NODE_OPTIONS but that didn't work. |
Just an update, I rolled my project back to Cypress 8.1 for now until this can be resolved. All tests run fine on that version. |
I have enough memory (32GB). My cypress runs in WSL2 and crashes as soon as |
Out of curiosity, I saw the note on the v10.0.0 release notes that a memory leak was fixed for e2e tests run using Related pull request: #19915 Release notes: https://docs.cypress.io/guides/references/changelog#10-0-0 |
I got a out of memory exception in Chrome running on Cypress v10.1.0. Already have the "keep one test in memory" option enabled. Switched to edge and ran a few test files. Started with around 1GB memory usage and am now on steady 4GB (only running cypress and nothing more on edge). Its definitely seems like a memory leak as it just does not free the memory even after finishing a test run |
Doesnt seem like the issue is fixed. I will check in azure in a moment but locally after migrating to cypress 10 when running the test my MAC is skyrocketing with CPU usage and it spins off the fans like crazy where as on 8.1 its quiet like a baby. |
Could this be caused by this? nodejs/node#35889 (comment) - which has troubled Jest users for a long time as well |
As I though and process just hangs. This happens on azure alto there are some console errors which were not present in versions between 8.2 and 10
|
Come-on we need this to be fixed ASAP there are multiple features from Cypress v10 that would simplify so much things and I want to use them but Im unable to due this bug.... @cellog @jennifer-shehane |
@DJSdev - Jennifer's currently on leave, so she won't be around to address this, but I'm certainly interested! Please ping me on your PR when you have it ready, I'll make sure it gets the team's attention ASAP. |
@BlueWinds PR is out! |
The code for this is done in cypress-io/cypress#22460, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
The Azure CI Agent machine running out of memory when running cypress tests on 8.2 & above on Azure Pipeline CI agents (Linux OS). The cypress dashboard eventually times out as well.
<--- Last few GCs --->
<--- JS stacktrace --->
Desired behavior
No response
Test code to reproduce
This has been consistently reproducible on 8.2 and 8.3. Running the same spec files on the same agents on version 8.1 and below works as expected.
Cypress Version
8.3
Other
No response
The text was updated successfully, but these errors were encountered: