Heroku塞拉格尺寸超过限制超过300米 [英] Heroku Slug Size exceed Limits More than 300m

查看:134
本文介绍了Heroku塞拉格尺寸超过限制超过300米的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的heroku弹塞大小是389mb,所以推送被拒绝。现在的要点是,如果我在新域中部署相同的应用程序(通过再次使用heroku创建),我看到的弹头大小仅为200mb。为什么它与众不同?然后我尝试了这种方法:

方法1:从我的项目目录中删除 .git 文件夹,然后再次 git init 。然后再部署在同一个heroku应用程序上。它没有任何区别!



方法2:通过声明 .slugignore 项目文件夹的根目录中的文件。但它也没有任何差异!



方法3:根据本网站 https://github.com/heroku/heroku-repo



我已经重置了我的回购,像这样,


$ b $

  heroku repo:reset -a appname 

但是,什么也没有发生!现在做什么?你能指导我吗? Thnx。

解决方案

Heroku建议




  • 检查你的slu hero'heroku run bash 以及使用诸如 ls du

  • 将大型资产(如PDF或音频文件)移至资产存储中
  • 移除不需要的依赖项并通过 .slugignore


My heroku slug size is 389mb, so push is rejected. Now the Point is, if i deploy my same application on new domain (by using heroku create again), the slug size, i am seeing is just 200mb.. Why its different? Then I have tried this approach:

Approach 1: by deleting .git folder from my project directory, then again git init. and then deploying again on same heroku app.. It didn't make any differences!

Approach 2: By declaring .slugignore file in root of project folder. But its too not making any diff!

Approach 3: as per this site, https://github.com/heroku/heroku-repo

I have reset my repo like this,

heroku repo:reset -a appname

But, nothing happened!! What to do now? Can u guide me? Thnx.

解决方案

As Heroku suggests:

  • Inspect your slug with heroku run bash and by using commands such as ls and du
  • Move large assets like PDFs or audio files to asset storage
  • Remove unneeded dependencies and exclude unnecessary files via .slugignore

这篇关于Heroku塞拉格尺寸超过限制超过300米的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆