0

I've suddenly started getting slug size errors on deploy:

-----> Compiled slug size: 350.4MB is too large (max is 300MB).

My app is far too small to be causing this, verified by manually inspecting bundle and assets size. Upon investigation in a one-off dyno, I discovered that files installed by the R buildpack are still in vendor/ even though I stopped using the buildpack months ago and unset BUILDPACK_URL:

~/vendor $ du -h --max-depth 1
90M ./ruby-2.0.0
28K ./plugins
24K ./heroku
122M    ./bundle
113M    ./glibc-2.7
16M ./bin
95M ./gcc-4.3
36M ./ruby-1.9.3
104K    ./assets
87M ./R
1.2M    ./gems
450M    ./libexec
108K    ./redis-rb
1008M   .  

Deleting them in a one-off dyno doesn't do it; they reappear in a new one.

How can I make these directories, like R/ and gcc-4.3/ permanently go away?

4

2 回答 2

2

It is possible that the R buildpack placed these files into your build's cache dir and then the Ruby buildpack is still pulling those in. It is unlikely that the two buildpacks would conflict that way, but is possible. I would recommend trying to push your code to a brand new app and see if your slug size drops. If so, you can use the third-party/unsupported heroku-repo plugin to purge your build cache on the original app.

于 2013-08-15T23:23:04.357 回答
0

从源代码中删除目录。事实上,您应该能够从源代码中删除 /vendor 下的大部分内容,并依赖 Heroku 包。

UPDATE0 来自 R buildpack github 页面上的 README.md:

注意事项

由于 R 运行时的大小,Heroku 上的 slug 大小(没有任何额外的包或程序代码)约为 45Mb。

你的另外 310MB 是从哪里来的?

于 2013-08-15T21:02:06.423 回答