DEV Community

Nick F
Nick F

Posted on

Failed deploy to dokku

I've got this Scala Play app that I develop on my laptop and deploy to a Dokku on a small Linode VPS.

These days, when I deploy, I get these failures:

$ git push dokku master
Counting objects: 72, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (70/70), done.
Writing objects: 100% (72/72), 10.72 KiB | 731.00 KiB/s, done.
Total 72 (delta 45), reused 0 (delta 0)
-----> Cleaning up...
-----> Building yt from herokuish...
-----> Adding BUILD_ENV to build environment...
-----> Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
       Detected buildpacks: multi scala
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-scala
=====> Detected Framework: Play 2.x - Scala
-----> Installing JDK 1.8... done
-----> Running: sbt compile stage
       [info] Loading global plugins from /tmp/scala_buildpack_build_dir/.sbt_home/plugins
       [info] Loading settings for project scala_buildpack_build_dir-build from plugins.sbt ...
       [info] Loading project definition from /tmp/scala_buildpack_build_dir/project
       [info] Loading settings for project root from build.sbt ...
       [info] Set current project to play-ytdl (in build file:/tmp/scala_buildpack_build_dir/)
       [info] Executing in batch mode. For better performance use sbt's shell
       [info] Compiling 21 Scala sources and 1 Java source to /tmp/scala_buildpack_build_dir/target/scala-2.13/classes ...
remote: .sbt_home/bin/sbt-extras: line 241:   480 Killed                  "$@" < /dev/null

       !     ERROR: Failed to run sbt!
       We're sorry this build is failing. If you can't find the issue in application
       code, please submit a ticket so we can help: https://help.heroku.com
       You can also try reverting to the previous version of the buildpack by running:
       $ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-scala#previous-version

       Thanks,
       Heroku

To MYDOMAIN.com:yt
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku@MYDOMAIN.com:yt'
Enter fullscreen mode Exit fullscreen mode

The .sbt_home/bin/sbt-extras: line 241: 480 Killed is the important part. Searching the web about it, this is not a Dokku issue. I can reproduce by checking out my source code on the VPS directly and trying to sbt stage to build the project myself. I get the same Killed message eventually.

The problem is I don't have enough RAM to build the project :-O

My options are to get more RAM, or compile the project locally and deploy an artifact. I'll look into the second option, but I might get lazy and buy a larger VPS. It will depend on my free time.

I make this post in case someone else is putting this error message into google and needs a hint on what is happening.

Top comments (1)

Collapse
 
alexb7217 profile image
alexb7217

I vote for laziness