Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku deployment of play 2.1 application very slow (region eu)

The deployment of my play 2.1 application is very slow since several weeks. In fact it is randomly so slow that the build times out (15 minutes time limit).

I already tried to use a custom buildpack, with few to no effect.

When I do the build locally as described here it takes appr. 10 minutes, but most of the time is spend in retrieval of the dependent artifacts. When i have a look at the build on Heroku, the retrieval doesn't need much time and thus the retrieval seems not to be the problem.

About the build: [info] Compiling 83 Scala sources and 3 Java sources.

It looks like the generation and packaging of sources and docs (never used in prod) seem to take a significant amount of time.

Is there any way to reduce the build time significantly, e.g. by shutting of the generation of docs?

like image 345
jan Avatar asked Jun 25 '13 15:06

jan


1 Answers

You can potentially reduce the time of compilation by reducing what is included in the compilation of your application. You can tell the Heroku slug compiler to exclude things like docs and sources from the application slug it creates.

Heroku uses a file called .slugignore which is the same concept as the .gitignore file. Details of the .slugignore file are covered in the Slug Compiler article on Heroku Dev Center:

https://devcenter.heroku.com/articles/slug-compiler

If you are unsure as to what is actually making up your deployment, you can connect via secure shell to your running Heroku application using the command

heroku run bash

Then you can navigate around your application deployment files and folders to see if there is anything else you can remove. The Heroku Scala build pack should have removed things like the ivy cache.

like image 75
jr0cket Avatar answered Oct 14 '22 11:10

jr0cket