-
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
Docker crashes when renderer process eats up too much memory #350
Comments
This is actually not indicative of a memory leak inside of Cypress (nor your application). This has to do with the way that browsers work under the hood. Luckily, we have a found a simple one line fix for this problem - simply add the flag This option is documented here. The If you are using docker run --ipc=host If you are using version: '2'
services:
foobarbazservice:
ipc: host ## this line right here In the future we are working on a more permanent fix such as described in #349 - either to automatically recover from these crashes, or mostly prevent them up from by nuking the renderer process in between spec files. |
I seem to be getting this problem too, because Chrome is running out of shared memory ( |
I had the same issue with Codeship CI. Just needed to change config in my codeship-services.yml file, according to documentation https://documentation.codeship.com/pro/continuous-integration/browser-testing/#chrome-crashing |
I wonder if this is related to our other issue with a Codeship CI run failing.#328 Unfortunately, we don't have a pro account, and the |
any advice on how to solve for this in CircleCI? I do not have a |
I think that since this issue has been made there is now a better fix for the problem by asking Chrome not to use |
hello @brian-mann . How do you set up the --ipc=host into the gitlab-ci.yml? |
Anyone know how to add |
You cannot. And this is why this workaoround does not really work. |
@maximilianschmitt seems to think you can: https://gitter.im/cypress-io/cypress/archives/2018/10/17 |
Actually, a build just finished and it crashed pretty quickly |
Looks like there's plenty of shared memory.
|
I had the same issue yet I have changed my image from image: cypress/browsers:node11.13.0-chrome73 |
I will test this image: cypress/browsers:node11.13.0-chrome73 right now. Thanks @alk831 |
I tested and it failed:
|
@bentrole It crashed only once for me with this image and now it works properly. I would try to split large tests into smaller ones and run without recording until there is no fix for this. |
@alk831 I already splited my tests because of that but this bug is there since 2016, If there is no fixes until now, I think that they will not correct that! ;-( |
@brian-mann can we please reopen this issue? If we cannot scale out our testing library, I don't think we can use this service :/ |
What about when running on github actions, like https://github.com/cypress-io/github-action ? How do you enable |
Started experiencing this again on github actions upgrading from 5.3 to 6.2 |
Version 6.2.1 seems to fix that for me. |
Unfortunately 6.2.1 still crashing https://github.com/corejam/corejam/runs/1650892998?check_suite_focus=true#step:9:290 staying on 5.3 for now. Maybe someone else can chime in a version number when it started happening for them between 5.3 & 6.2 as I dont have the time to manually go through each version / build the associated docker images |
https://github.com/corejam/corejam/runs/1784204472?check_suite_focus=true#step:9:313 Still no luck on 6.3.0 5.3.0 still stable for us have not had any chrome crashes there Edit crashes on 6.4.0 too: https://github.com/corejam/corejam/runs/1820965122?check_suite_focus=true#step:9:287 |
Anyone looking to enable You can see it setting the option here: https://github.com/corejam/corejam/runs/1888917637?check_suite_focus=true#step:2:111 More context here: actions/runner-images#2697 (comment) Just let it run through 3 times on our setup and its finally running it seems!! Can anyone else confirm? If its working for others ill put in a MR with the above sample for docs Edit: Have since put on about 10 runs from merge requests and its stable! |
FWIW, in our case adding |
Needed to avoid big tests failing. See cypress-io/cypress#350 (comment)
If you added --ipc=host and you still get the error, try restarting docker 🤦 |
The code for this is done in cypress-io/cypress#15825, but has yet to be released. |
In 7.0.1, Cypress passes |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Related to #348 and #349.
When running headlessly on very long and memory intense applications we are seeing renderer crashes with Docker.
The text was updated successfully, but these errors were encountered: