How to reduce heroku slug size?

浪子不回头ぞ 提交于 2019-12-05 03:36:23

Finally, after 3 days, Heroku cleaned up my cache. Everything is fine now though my slug is still 54MB which seems too big.

Heroku confirmed there was no other solution than contacting them to resolve this issue. Hopefully, it will be resolved in a future version of bundler.

I've been able to trim a few megabytes here and there by listing directories in the .slugignore file. That may help you stay under the 100mb limit until this issue gets resolved.

You may also want to experiment with pushing your changes into a new repository without history, since it looks like Heroku is penalizing you with the full size of the cloned git tree that you are referencing.

Being as Heroku have acknowledged the problem in the post you have referenced I would wait and sit it out until Heroku have fixed it their end. I take it you've already looked into some of the other ways to reduce a slug size with a .slugignore file?

Slug size will include all your gems so the more gems you use the larger your slug size will be since each Heroku app maintains it's own gems these days. I'd not heard of :git referenced gems using more space but I have now though.

THE TRICK THAT FIXED THE PROBLEM FOR ME:

What works: I made another folder. I search for git in that folder. and I delete the files on the xml file and then I tried uploading to Heroku and it worked.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!