-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
High CPU usage during cypress run #19491
Comments
Interesting, because 9.2.0 was supposed to fix some instances of high CPU use. |
Looks to me that this happens after an update from 8.5.0 to 8.6.0. |
It was during the |
10.3.1 seems still to occur |
|
I got in `open' mode for cypress v11.02 |
I've same problem v11.2.0 |
Since this ticket is 'Closed', anybody knows how to reopen it? |
I don't know but this issue angries me |
Today, I upgraded v12.1.0 and unfortunately same problem continue. Help Us Please.... |
:) I am still fighting whether I should smash my M1. It is just fine on an Ubuntu box. |
I talked with my friend , she has no problem that uses previous versions. I've tried to alter my cypress version (like v9.1.) but I couln't. I want to learn cypress but can't run it. Anyone help me ??? |
Hello @mihhail-m , based on your comment there is not enough to investigate. This issue is for a quite old version of Cypress and so far there have been no reproducible examples provided. As such I am going to close this issue. A note for everyone following this ticket, that many performance enhancements and better support for M1 macs have occurred since version 9. Please try using the latest version of Cypress and if you are still encountering an issue, please open a new ticket with a reproducible example and etails and the Cypress team will be happy to investigate. |
hi @nagash77 |
we have the same problem version 12.12.0 macbook m1, started to happen when initializing a new project locally, even with the test examples provided by cypress, however, the same thing does not happen with an old project that I upgraded to the same version. |
@mihhail-m or @martin73h do either of you have reproducible examples of this behavior? A fork of Cypress Test Tiny is the best way to share an example repo that makes our debugging process much faster and more reliable. |
@nagash77 Sorry for the delayed response. Not sure what code pieces I can provide. I can just describe the setup we have and maybe this will help you reproduce. This is the bit of chromeWebSecurity: false,
numTestsKeptInMemory: 0,
// we enable retries only for some tests individually
retries: {
runMode: 0,
openMode: 0,
},
video: true,
videoCompression: false,
// allows us to create new user for each test run and have clean environment
testIsolation: false,
screenshotOnRunFailure: false,
defaultCommandTimeout: 90000, As for the tests, they are simple cypress tests that involve authorising (via api calls), loading the page, navigating somewhere, clicking something, asserting something is present. Basic stuff. And then we have CI environment. We are using Codefresh to run our pipelines and we do have limited control over docker containers. But it allows us to run test suites in parallel within designated containers. So each test suite of 10-20 tests would run headless in its own docker container, which is running on top of "larger" docker container (you can lookup codefresh docs for exact architecture). We usually allocate a little more resource (cores, memory) just to make sure everything is running smoothly. Most of the time it does. However we still see those crazy CPU (despite allocating 2 - 4 cores) spikes which lead to a lot of inconsistent tests and frustration as we are never sure what is the exact reason why tests are failing. So, thats the setup. Hope that helps. We know that part of this behaviour could caused by the Codefresh pipelines, but for now there is no possibility for us to switch. But it also can be on the Cypress side as sometimes it is running fine and sometimes its CPU usages spikes as crazy. |
Hi @mihhail-m , thanks for this info. It appears you are setting things in a wqay that I would think would optimize for performance. Is there anyway you can share a fork of Cypress Test Tiny with an example of a test that shows this behavior? Are you seeing this behavior anywhere else besides in your Codefresh CI environment? I ask because we will not be able to replicate the codefresh environment internally to reproduce this behavior if that is the case. Does this behavior happen locally as well when using the same sized docker containers? |
@nagash77 I will see what I can do about fork example. Might take time as its not the highest priority right now. As for the other questions:
|
@mihhail-m would it be possible to try and run the example in the same docker container you use in CI on your local machine? |
This keeps happening to us (v 12.17.3);
Please search Cypress documentation for possible solutions: Check if there is a GitHub issue describing this crash: https://github.com/cypress-io/cypress/issues Consider opening a new issue. Platform: darwin-arm64 (22.5.0) Node version v18.16.0 we solved this by downloading an old repository with Cypress 12.13.0 which worked, but I don't think this has to do with the version since if we install the mentioned version instead of the last one we have the same problem. |
@martin73h Sorry I am not quite following. You are seeing the problem only in 12.17.3 and not 12.13.0? Are you able to look at your debug logs and see what messages are in there? This sounds like some sort of infinite loop occurring somewhere. Are you using able to run https://github.com/cypress-io/cypress-test-tiny? |
I'm having a similar issue. I have two Windows machines where one of them works fine but the second is having issues during cypress open or cypress run. I don't need to choose a browser to continue with the test, cypress crashes before that. Also, sometimes I could run a single test but after 1min cypress crashes. This is just a new project so I just ran npm init and install cypress. These are my specs: |
@nagash77 I have this bug when installing any version, what I did was clone an old repository and edit it to create new tests, I didn't see anything strange in the logs, and everything seems to run fine, what should I do with https://github.com/cypress-io/cypress-test-tiny ? I have never used it. |
@martin73h you should fork it and setup an example of a test that produces the behavior you are seeing on your local machine so that we may take it and run it ourselves to see if we see the same behavior. |
If anyone stumbles upon this issue, it stems from a bug where variants of it occurred in two ranges of versions. Only was reproducible in Broken in 8.6.0 and fixed in 10.4.0 here - #23001 |
Same as me: "cypress": "^13.14.2",. UI starts very slow, runs 2 or 3 times slow and then freezes computer. Need to reboot. This started recently, about 2 months ago. I was using version 11.2 of Cypress without any problems. The computer, Windows 11, is constantly updated by my company and I cannot downgrade it. I updated Cypress through all versions up to the current one, including downgrading to v. 10. No success. It improves a little if I use the UI without VSCode. |
Current behavior
I just wanted to try the latest version of the Cypress. I updated from 8.1.0 to 9.2.0 and I just got scared when I run my tests because my MacBook fans started to spin like crazy. Like a boeing 727 taking off..
There is clearly some issue regarding the new version of the Cypress (9.2.0) especially on the MacOS.
Desired behavior
Tests running smoothly like on the version 8.1.0 without the HIGH CPU overhead.
Test code to reproduce
I've checked this with my repo and the default use-cases that cypress provides on fresh install
Cypress Version
9.2.0
Other
No response
The text was updated successfully, but these errors were encountered: