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

Error: Something went wrong! #199

Closed
maxime1992 opened this issue Jan 26, 2019 · 7 comments
Closed

Error: Something went wrong! #199

maxime1992 opened this issue Jan 26, 2019 · 7 comments

Comments

@maxime1992
Copy link

Hi,

I'm trying to deploy my app to prod but it's crashing in... 8 out of 10 cases on the frontend task 🤔

I've built and Angular (7) app and the error seems to appear when the app is being built.
It's completely fine locally and working sometimes while deploying with Exoframe too.

I ran the deploy like the following:
exoframe deploy -u -vvv

And the only message I've got is

Error deploying project: Error: Something went wrong!
Build log:

No log available

Original error: { Error: Something went wrong!
    at Object.exports.handler (/home/maxime/.config/yarn/global/node_modules/exoframe/src/commands/deploy.js:218:19)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7) response: {} }
Original response: {}

So I'm really not sure what is going on here.

@yamalight
Copy link
Contributor

@maxime1992 is your app code public? if not - could you create a simple project that reproduces the issue?

@maxime1992
Copy link
Author

@yamalight unfortunately that one is not opensource.

I think that I might have been able to repro locally and understand (maybe) the root of the issue.

The server I'm deploying to only have 1gb of RAM.

So I've limited locally the nodejs available memory for my build and I've ended up with an error:

$ node --max_old_space_size=500 ./node_modules/@angular/cli/bin/ng build --prod

<--- Last few GCs --->

[194:0x5651db7dc640]    44515 ms: Mark-sweep 476.9 (510.7) -> 475.8 (510.7) MB, 286.0 / 0.0 ms  (average mu = 0.117, current mu = 0.040)allocation failure scavenge might not succeed
[194:0x5651db7dc640]    44932 ms: Mark-sweep 476.5 (510.7) -> 476.1 (511.2) MB, 391.1 / 0.0 ms  (average mu = 0.087, current mu = 0.063)allocation failure scavenge might not succeed

<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x36692015be1d]
Security context: 0x235674c1e6e1 <JSObject>
    1: /* anonymous */ [0x2f7a4c54cc9] [/opt/aer/node_modules/acorn/dist/acorn.js:~4722] [pc=0x36692199e279](this=0x1bf9e5a70c71 <Parsermap = 0xba0ba707ab1>,type=0x3df26da58ef9 <TokenType map = 0x341c8a6640d1>,val=0x0d6e41a06cf9 <String[4]: null>)
    2: /* anonymous */ [0x2f7a4c552c9] [/opt/aer/node_modules/acorn/dist/acorn.js:5254] [bytecode=0xa2f936923c1...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
error Command failed with signal "SIGABRT".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command '/bin/sh -c yarn --frozen-lockfile && yarn run cms:build:prod && yarn run build:prod && rm -rf node_modules' returned a non-zero code: 1

So I think the only thing missing here would be to display the error?

@yamalight
Copy link
Contributor

@maxime1992 1gb of RAM is the minimum requirement for exoframe.
If you are running complex build - it might just be going OOM at one point 🤔
You can try running build locally and measuring how much RAM it needs to see if that's the case.
I'd recommend a server with at least 2gb or - even better - 4gb of RAM if you intend to run builds on it.

@yamalight
Copy link
Contributor

@maxime1992 you should now be able to deploy your project using your image tar file.
to do so - add the following to exoframe project config:

{
  "image": "imageName",
  "imageFile": "myImage.tar"
}

Place that file next to myImage.tar (can be generated by running docker save myImage > myImage.tar and execute exoframe deploy 🤔

@maxime1992
Copy link
Author

Nice one! That's also a workaround for the private registry issue 😄!

Is it possible to use that if I'm deploying through a docker-compose file? 🤔

@yamalight
Copy link
Contributor

@maxime1992 nope, that's a separate template and only works as a standalone thing.
doing that with compose would be very tricky

@yamalight
Copy link
Contributor

I'm closing this due to inactivity. Feel free to re-open if needed.

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

No branches or pull requests

2 participants