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

Build error 137 during meteor build in CI only #109

Open
wernight opened this issue Jul 10, 2018 · 3 comments
Open

Build error 137 during meteor build in CI only #109

wernight opened this issue Jul 10, 2018 · 3 comments

Comments

@wernight
Copy link
Contributor

wernight commented Jul 10, 2018

I can docker build . locally but in CI this doesn't work. Sadly the script outputs don't detail much:

Even with METEOR_ALLOW_SUPERUSER or --allow-superuser, permissions in your app
directory will be incorrect if you ever attempt to perform any Meteor tasks as
a normal user. If you need to fix your permissions, run the following command
from the root of your project:

  sudo chown -Rh <username> .meteor/local

/opt/build_scripts/build-meteor.sh: line 27:  4542 Killed                  meteor build --directory $APP_BUNDLE_DIR --server-only
The command '/bin/sh -c cd $APP_SOURCE_DIR &&   $BUILD_SCRIPTS_DIR/install-deps.sh &&   $BUILD_SCRIPTS_DIR/install-node.sh &&   $BUILD_SCRIPTS_DIR/install-phantom.sh &&   $BUILD_SCRIPTS_DIR/install-graphicsmagick.sh &&   $BUILD_SCRIPTS_DIR/install-mongo.sh &&   $BUILD_SCRIPTS_DIR/install-meteor.sh &&   $BUILD_SCRIPTS_DIR/build-meteor.sh &&   $BUILD_SCRIPTS_DIR/post-build-cleanup.sh' returned a non-zero code: 137

Would be nice to get rid of that chown warning. I see only two reasons it could fail:

  1. It's using a lot of memory when building (> 1 or 2 GB just for the build).
  2. File access rights are different and this image is sensible to current file's UID/GID.

I looked a bit at memory using during a local build and it looks like it's using substantially more memory around that step (at least 1.6 GB additional). Looks like there is an option TOOL_NODE_FLAGS=--max-old-space-size=2048 (trying that now) that allows to limit memory usage. It may be nice to map error 137 to show that a suggested solution.

@wernight
Copy link
Contributor Author

wernight commented Jul 10, 2018

Found meteorhacks/meteord#96 so it's really an out of memory issue. See also meteor/meteor#9568

@wernight
Copy link
Contributor Author

wernight commented Jul 10, 2018

Similar to #41 but I'd like to have the option to put it in launchpad.conf (because I'm using GitLab Auto DevOps). I'm trying a workaround by setting ENV in Dockerfile.

wernight added a commit to wernight/meteor-launchpad that referenced this issue Jul 10, 2018
@wernight
Copy link
Contributor Author

bump

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

No branches or pull requests

1 participant