Can't compile Elixir App

Hey team,

I’m trying to port an app from Gigalixir and i’m running into an issue when trying to build.

==> jason
Compiling 8 files (.ex)
Generated jason app
==> poison
Compiling 4 files (.ex)
Compiling lib/poison/parser.ex (it's taking more than 10s)
Killed
Error error building: error rendering build status stream: The command '/bin/sh -c mix deps.compile' returned a non-zero code: 137

It seems to do this even if I set memory to 2gb (which is insane, because my app runs perfectly fine with 512gb on gigalixr).

Anyone have any ideas to why the build just crashes like this? I’ve been also using --verbose there and thats all the info I get.

Are you using local Docker to build this? You can tell in the very early part of the logs, it’ll either say “Using local Docker Daemon” or “Remote builder”.

If it’s using local Docker, try adding --remote-only to see if our remote builders have more success.

Docker on MacOS on m1 machines has all kinds of problems: Docker build fails when targeting `--platform linux/amd64`, due to `allocate virtual memory` issue · Issue #5831 · docker/for-mac · GitHub

1 Like

Thanks @kurt - I’m getting the same issue with the --remote-only flag. I’ve also tried scaling up the builder machine with no luck

Will you try one more time with --remote-only? It’s possible the remote builder was only getting 1GB of RAM. They should be getting 8GB RAM now.

Thanks for looking into this @kurt

Still getting the same error

Generated decimal app
==> jason
Compiling 8 files (.ex)
Generated jason app
==> poison
Compiling 4 files (.ex)
Compiling lib/poison/parser.ex (it's taking more than 10s)
Killed
Error error building: error rendering build status stream: The command '/bin/sh -c mix deps.compile' returned a non-zero code: 137

Looks like it’s running on the following remote worker:

Remote builder fly-builder-rough-morning-7141 ready

I’ve also tried to manually scale that worker up to 8GB with no luck here, same 137 exit code

You can’t scale builders (despite our UX pretending you can). We’re still trying to figure out what’s going on here. You can workaround this problem by running Docker locally and deploying with fly deploy --local-only.

1 Like

I’m stuck there too - Have an m1 mac :frowning:

I’m subscribed to these so ping me and i’d be happy to try again :slight_smile:

Give it another try? I cleared your builders to see if that’d help.

So far, so good, It’s made it past the memory issue. Thanks @kurt