Skip to content
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

Add OOM error warning to build script; resolves #50 #51

Merged
merged 1 commit into from
Dec 30, 2020

Conversation

opyh
Copy link
Contributor

@opyh opyh commented Jun 12, 2020

Meteor’s source map generation uses no GC, which can produce out-of-memory errors in CI environments with <4G RAM.

If this happens, the reason for killed containers can be difficult to track down. Some environments display a ‘OOMError’, some show a cryptic error message (‘non-zero exit code 137’), some show no error at all.

This adds a warning so you have a clue from the logs when the container is killed.

Related Meteor issue: meteor/meteor#9568

The logs look like this:

Step 5/20 : RUN bash $SCRIPTS_FOLDER/build-meteor-bundle.sh
 ---> Running in 7ebb0bedc6cd

[-] Building Meteor application bundle...

    This container can use 3940M memory in total.
    If it aborts with an out-of-memory (OOM) or ‘non-zero exit code 137’ error message,
    please increase the container’s available memory.

    See https://github.com/meteor/meteor/issues/9568 for details.

Meteor’s source map generation uses no GC, which can produce out-of-memory errors in CI environments with <4G RAM.

If this happens, the reason for killed containers can be difficult to track down. Some environments display a ‘OOMError’, some show a cryptic error message (‘non-zero exit code 137’), some show no error at all.

This adds a warning so you have a clue from the logs when the container is killed.

Related Meteor issue: meteor/meteor#9568
@GeoffreyBooth GeoffreyBooth merged commit 7e7d5be into disney:master Dec 30, 2020
@GeoffreyBooth
Copy link
Collaborator

@opyh Thank you for this, and sorry for the long delay in reviewing and approving it. This warning saved a colleague of mine many hours of debugging.

@opyh
Copy link
Contributor Author

opyh commented Jan 4, 2021

Thanks, good to hear it was worth it :)

@raLaaaa
Copy link

raLaaaa commented Mar 12, 2023

Sorry for bumping this - is there any solution I can use this approach with a CI envrionment with 2GB RAM? I'm encountering exactly that issue and I'm not quite sure how to tackle it.

@opyh
Copy link
Contributor Author

opyh commented Mar 24, 2023

@raLaaaa You could try to remove the sourcemaps step from your build process. With a bit of luck, this might fix it.

@raLaaaa
Copy link

raLaaaa commented Mar 24, 2023

@opyh - thanks for the hint. Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants