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?

jordanpg
  • 6,386
  • 4
  • 46
  • 70

2 Answers2

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.

ryanbrainard
  • 5,918
  • 35
  • 41
0

Delete the directories from your source code. In fact, you should be able to delete most everything under /vendor from your source code, and rely on the Heroku packages.

UPDATE0 From the README.md on the R buildpack github page:

Caveats

Due to the size of the R runtime, the slug size on Heroku, without any additional packages or program code, is approximately 45Mb.

Where is your other 310MB coming from?

Community
  • 1
  • 1
Terry G Lorber
  • 2,932
  • 2
  • 23
  • 33
  • These directories are not a part of my project. They are built and installed by the buildpack (see link above). – jordanpg Aug 15 '13 at 21:02
  • I noticed that. The sum of the contents of the R/ and other library build dependencies was something like 150M, which was still not enough to account for the full 300M. Purging the cache and then rebuilding left these dirs in vendor/: assets, bundle, heroku, plugins, and ruby-2.0.0. I think the excess was in the old 1.9.3 directory. Apparently cached 1.9.3 files are kept around if you upgrade to 2.0.0. – jordanpg Aug 20 '13 at 17:23