-
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
cypress run occasionally crashes with node OOM errors #1955
Comments
Are there any logs I could capture to help troubleshoot this? It seems like it happens about 10% of the time currently (10 out of ~100 runs). Also, I've tried adjusting the node runtime options with my circleci yaml config: - run:
name: Test E2E with Chrome
command: TOOL_NODE_FLAGS="--max_old_space_size=4096" npm run test:cypress:chrome |
Different issue but comment is the same for outputting It appears that the process ran out of memory. Are you getting any messages from Circle about the process being killed because it exceeded the memory limit? You might want to try setting this environment for electron: I actually am not sure if Since you have 100 specs files, approximately how long does your run take? Does it crash in the same place? different place? At the beginning? middle? end? |
Thanks for the comment on the previous ticket and the electron flag, I'll try adding those to see if I can get any other relevant information to provide.
I'm trying to run parallel builds with circleci for this job now as a short term work around (~50 specs per build), I'll report back if I do or don't get any OOM crashes from that to see if it's something memory leaky/duration related to something the tests might be specifically doing. |
@bsmithEG we are releasing With that said - we've never seen OOM problems (especially in Circle) related to the main node process. It does hold some state, but not much, other than holding onto the test results. I suppose that if you're doing something totally unusual and really complex like dynamically generating tests with like a million lines of text, that it could probably OOM as a result. Perhaps there is an area of the system I'm not accounting for us creating state in, but perhaps you could go into more detail about the nature of your tests and whether you feel any are unusual. Perhaps try stopping the video recording. We do have to buffer those frames in memory as we write them to the video, but we designed that system to automatically drop frames if it's not able to keep up (if its CPU bound for instance). We might need to expose a flag that takes a memory dump after each spec so that we can detect any leaks or unaccounted for state. OH: I forgot we have this ondocumented flag: Add that as an environment variable and once a second it will output the current node process's memory. We should be able to easily see this increasing if there's a leak. Try that and see what you get. I would try that first before adding the |
The same issue is happening for me running locally on my machine. This happens after running just 5 UI tests, on execution of 6, interface becomes laggy and after some time it crashes. Increasing --max_old_spec_size is not fixing the issue for me, is there any workaround without the circle ci, for local runs? I don't think that it's ok if this issue happens just after 5 tests execution. |
Since you're using typescript too, it might be the same issue as #2316 |
I've run now into the same issue - Cypress 3.1.0, Mac OS X 10.13.6, Electron 59 <--- Last few GCs --->
<--- JS stacktrace ---> ==== JS stack trace =========================================
Memory statements from CYPRESS_MEMORY=1 did not show a significant increase and as well no direct shortage of memory
The third info was taken after the last request was send - and directly after that the GC statement showed up. After setting We're not running typescript - plain javascript tests. |
We made several performance improvements in our latest updates, particularly version 3.3.2, can we get an update on whether this issue is still occurring in our latest version? Thanks! |
I can see memory issue in 3.4.1 -
|
We run into the same issue with version 3.4.1. For now, we solve it by running our test suite in several chunks via the |
I have the same issue. Cypress 3.4.1, running in Docker container, TypeScript. The problem is not in the amount of physical memory on host, cypress crash when Cypress Helper process reach memory size 2.1 GB.. Making this config https://github.com/cypress-io/cypress/issues/2316#issuecomment-516824284 fixed the issue. IMPORTANT: use ts-config of version 4.4.2. The latest version do not work for some reason... |
@Postavshik I have the same issue, |
Since this issue hasn't had activity in a while, we'll close the issue until we can confirm this is still happening. Please comment if there is new information to provide concerning the original issue and we'd be happy to reopen. |
Here is my solution, after spending quite a while on this:
I was previously failing with the memory issue when using |
Current behavior:
Desired behavior:
No crash
Steps to reproduce:
circleci 2.0 config
chrome67-ff65 docker img
cypress-typescript-preprocessor
100 spec files
Versions
Cypress 3.0.1
Running chrome67-ff65 docker image on CircleCI 2.0 Ubuntu 16.04
The text was updated successfully, but these errors were encountered: