Heroku deployment
See original GitHub issueHello, I am using Ktor for about a month, and I want to deploy it on Heroku. I am using Gradle, but it keeps running out of memory when building on the server instance. I know this is far unrelated to Ktor, but It would be much helpful if there is a post, or a video, that shows how to deploy on Heroku and fine-tuning Gradle build memory.
2017-09-10T22:13:24.411340+00:00 app[web.1]: Download http://dl.bintray.com/kotlin/ktor/org/jetbrains/ktor/ktor-jetty/0.4.0/ktor-jetty-0.4.0.jar
2017-09-10T22:13:24.489633+00:00 app[web.1]: Download http://dl.bintray.com/kotlin/ktor/org/jetbrains/ktor/ktor-locations/0.4.0/ktor-locations-0.4.0.jar
2017-09-10T22:13:24.557579+00:00 app[web.1]: Download https://jcenter.bintray.com/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
2017-09-10T22:13:24.619967+00:00 app[web.1]: Download https://jcenter.bintray.com/com/google/code/gson/gson/2.8.1/gson-2.8.1.jar
2017-09-10T22:13:24.690789+00:00 app[web.1]: Download https://jcenter.bintray.com/joda-time/joda-time/2.9.9/joda-time-2.9.9.jar
2017-09-10T22:13:24.777056+00:00 app[web.1]: Download http://dl.bintray.com/kotlin/exposed/org/jetbrains/exposed/exposed/0.8.5/exposed-0.8.5.jar
2017-09-10T22:13:24.910833+00:00 app[web.1]: Download https://jcenter.bintray.com/com/h2database/h2/1.4.196/h2-1.4.196.jar
2017-09-10T22:13:25.016004+00:00 app[web.1]: Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.1.4-2/kotlin-stdlib-jre7-1.1.4-2.jar
2017-09-10T22:13:25.110782+00:00 app[web.1]: Download http://dl.bintray.com/kotlin/ktor/org/jetbrains/ktor/ktor-hosts-common/0.4.0/ktor-hosts-common-0.4.0.jar
2017-09-10T22:13:25.188960+00:00 app[web.1]: Download http://dl.bintray.com/kotlin/ktor/org/jetbrains/ktor/ktor-servlet/0.4.0/ktor-servlet-0.4.0.jar
2017-09-10T22:13:25.261784+00:00 app[web.1]: Download https://jcenter.bintray.com/org/eclipse/jetty/jetty-server/9.4.6.v20170531/jetty-server-9.4.6.v20170531.jar
2017-09-10T22:13:25.354210+00:00 app[web.1]: Download https://jcenter.bintray.com/org/eclipse/jetty/jetty-servlets/9.4.6.v20170531/jetty-servlets-9.4.6.v20170531.jar
2017-09-10T22:13:25.409480+00:00 app[web.1]: Download https://jcenter.bintray.com/org/eclipse/jetty/jetty-alpn-server/9.4.6.v20170531/jetty-alpn-server-9.4.6.v20170531.jar
2017-09-10T22:13:25.464805+00:00 app[web.1]: Download https://jcenter.bintray.com/org/eclipse/jetty/http2/http2-server/9.4.6.v20170531/http2-server-9.4.6.v20170531.jar
2017-09-10T22:13:25.580746+00:00 app[web.1]: Download http://dl.bintray.com/kotlin/ktor/org/jetbrains/ktor/ktor-core/0.4.0/ktor-core-0.4.0.jar
2017-09-10T22:13:25.778034+00:00 app[web.1]: Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-reflect/1.1.4/kotlin-reflect-1.1.4.jar
2017-09-10T22:13:25.851761+00:00 app[web.1]: Download https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-coroutines-jdk8/0.17/kotlinx-coroutines-jdk8-0.17.jar
2017-09-10T22:13:25.916693+00:00 app[web.1]: Download https://jcenter.bintray.com/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar
2017-09-10T22:13:25.992860+00:00 app[web.1]: Download https://jcenter.bintray.com/com/typesafe/config/1.3.1/config-1.3.1.jar
2017-09-10T22:13:26.118605+00:00 app[web.1]: Download http://dl.bintray.com/kotlin/ktor/org/jetbrains/ktor/ktor-auth/0.4.0/ktor-auth-0.4.0.jar
2017-09-10T22:13:26.194937+00:00 app[web.1]: Download https://jcenter.bintray.com/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar
2017-09-10T22:13:26.271935+00:00 app[web.1]: Download https://jcenter.bintray.com/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar
2017-09-10T22:13:26.352141+00:00 app[web.1]: Download https://jcenter.bintray.com/org/eclipse/jetty/jetty-http/9.4.6.v20170531/jetty-http-9.4.6.v20170531.jar
2017-09-10T22:13:26.419922+00:00 app[web.1]: Download https://jcenter.bintray.com/org/eclipse/jetty/jetty-io/9.4.6.v20170531/jetty-io-9.4.6.v20170531.jar
2017-09-10T22:13:26.483115+00:00 app[web.1]: Download https://jcenter.bintray.com/org/eclipse/jetty/jetty-continuation/9.4.6.v20170531/jetty-continuation-9.4.6.v20170531.jar
2017-09-10T22:13:26.561193+00:00 app[web.1]: Download https://jcenter.bintray.com/org/eclipse/jetty/jetty-util/9.4.6.v20170531/jetty-util-9.4.6.v20170531.jar
2017-09-10T22:13:26.635438+00:00 app[web.1]: Download https://jcenter.bintray.com/org/eclipse/jetty/http2/http2-common/9.4.6.v20170531/http2-common-9.4.6.v20170531.jar
2017-09-10T22:13:26.692746+00:00 app[web.1]: Download https://jcenter.bintray.com/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar
2017-09-10T22:13:26.761301+00:00 app[web.1]: Download https://jcenter.bintray.com/org/eclipse/jetty/http2/http2-hpack/9.4.6.v20170531/http2-hpack-9.4.6.v20170531.jar
2017-09-10T22:13:26.837263+00:00 app[web.1]: Download https://jcenter.bintray.com/junit/junit/4.10/junit-4.10.jar
2017-09-10T22:13:26.891110+00:00 app[web.1]: Download https://jcenter.bintray.com/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar
2017-09-10T22:13:27.107970+00:00 app[web.1]: Using kotlin incremental compilation
2017-09-10T22:13:35.452429+00:00 heroku[web.1]: Process running mem=693M(133.5%)
2017-09-10T22:13:35.452726+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-09-10T22:13:51.349580+00:00 app[web.1]: :compileJava UP-TO-DATE
2017-09-10T22:13:51.460589+00:00 app[web.1]: :copyMainKotlinClasses
2017-09-10T22:13:51.738049+00:00 app[web.1]: :processResources
2017-09-10T22:13:51.740250+00:00 app[web.1]: :classes
2017-09-10T22:13:52.026062+00:00 app[web.1]: :jar
2017-09-10T22:13:52.514525+00:00 app[web.1]: :startScripts
2017-09-10T22:13:52.819342+00:00 app[web.1]: :distTar
2017-09-10T22:13:54.436663+00:00 app[web.1]: :distZip
2017-09-10T22:13:57.636714+00:00 heroku[web.1]: Process running mem=793M(155.0%)
2017-09-10T22:13:57.636945+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-09-10T22:14:01.787160+00:00 app[web.1]: :shadowJar
2017-09-10T22:14:01.853661+00:00 app[web.1]: :startShadowScripts
2017-09-10T22:14:01.976728+00:00 app[web.1]: :shadowDistTar
2017-09-10T22:14:02.593865+00:00 app[web.1]: :shadowDistZip
2017-09-10T22:14:02.594918+00:00 app[web.1]: :assemble
2017-09-10T22:14:02.598841+00:00 app[web.1]: :compileTestKotlin UP-TO-DATE
2017-09-10T22:14:02.599871+00:00 app[web.1]: :compileTestJava UP-TO-DATE
2017-09-10T22:14:02.604608+00:00 app[web.1]: :copyTestKotlinClasses
2017-09-10T22:14:02.606123+00:00 app[web.1]: :processTestResources UP-TO-DATE
2017-09-10T22:14:02.606581+00:00 app[web.1]: :testClasses UP-TO-DATE
2017-09-10T22:14:02.626156+00:00 app[web.1]: :test UP-TO-DATE
2017-09-10T22:14:02.627769+00:00 app[web.1]: :check UP-TO-DATE
2017-09-10T22:14:02.627894+00:00 app[web.1]: :build
2017-09-10T22:14:02.639585+00:00 app[web.1]:
2017-09-10T22:14:02.639884+00:00 app[web.1]: BUILD SUCCESSFUL
2017-09-10T22:14:02.640076+00:00 app[web.1]:
2017-09-10T22:14:02.640299+00:00 app[web.1]: Total time: 1 mins 11.929 secs
2017-09-10T22:14:03.312499+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
2017-09-10T22:14:04.184513+00:00 app[web.1]: 22:14:04.181 [main] INFO org.eclipse.jetty.util.log - Logging initialized @863ms to org.eclipse.jetty.util.log.Slf4jLog
2017-09-10T22:14:04.393010+00:00 app[web.1]: 22:14:04.392 [main] INFO ktor.application - No ktor.deployment.watch patterns specified, automatic reload is not active
2017-09-10T22:14:06.329446+00:00 app[web.1]: 22:14:06.329 [main] TRACE ktor.application - Application started: org.jetbrains.ktor.application.Application@2a5b3fee
2017-09-10T22:14:06.336480+00:00 app[web.1]: 22:14:06.336 [main] INFO org.eclipse.jetty.server.Server - jetty-9.4.z-SNAPSHOT
2017-09-10T22:14:06.551205+00:00 app[web.1]: 22:14:06.550 [main] INFO o.e.jetty.server.AbstractConnector - Started ServerConnector@7a7333aa{HTTP/1.1,[http/1.1, h2c]}{0.0.0.0:8080}
2017-09-10T22:14:06.551477+00:00 app[web.1]: 22:14:06.551 [main] INFO org.eclipse.jetty.server.Server - Started @3239ms
2017-09-10T22:14:18.295752+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch
2017-09-10T22:14:18.295752+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-09-10T22:14:18.477851+00:00 heroku[web.1]: Process exited with status 137
2017-09-10T22:14:18.490771+00:00 heroku[web.1]: State changed from starting to crashed
2017-09-10T22:14:20.149480+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/latest" host=hawajes.herokuapp.com request_id=34007d55-8603-455a-9f2f-359655891b6a fwd="37.236.18.126" dyno= connect= service= status=503 bytes= protocol=https
2017-09-10T22:14:21.028044+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hawajes.herokuapp.com request_id=dfc5a68d-6972-4f9e-aeac-4eb1a19ea4a3 fwd="37.236.18.126" dyno= connect= service= status=503 bytes= protocol=https
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Deployment - Heroku Dev Center
Most Heroku deployments are performed with Git. Heroku also supports Docker-based deployments. Additionally, you can deploy to Heroku via any of the following ......
Read more >Heroku Deploy – How to Push a Web App or Site to Production
Heroku allows developers to quickly and almost painlessly deploy an application on a web server. It also provides a lot of plugins that...
Read more >Heroku Deployment Guide | The Full-Stack Blog - GitHub Pages
Deploy to Heroku ... Okay, it's time to actually deploy your application! Deployment allows other developers to give you more detailed feedback ...
Read more >Deploy to Heroku - CircleCI
Deploy with the Heroku orb · Create a Heroku account and follow the Getting Started on Heroku documentation to set up a project...
Read more >Deploying a Back-End with Heroku - Codecademy
Deploying to Heroku ... Login to your Heroku account and click the New button in the upper right corner of you dashboard. Then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ddsoyka that’s great, thanks for sharing. But keep in mind that it uses the heroku-gradle plugin. @bluemix is currently using
git push
, which are different deployment mechanisms. Both are great and supported–only a matter of preference.@bluemix If you want an example of how to do a Heroku deployment, you can take a look at my project source code, specifically this gradle build file.