Heroku Slug Size

时间:2018-07-25 05:28:37

标签: heroku size slug otree

I have a python app built on oTree software which I am trying to upload onto and deploy from Heroku. However, I keep getting an error that my slug size is too big. It is around 40 M more that the 500 M that Heroku allows.

I have added a .gitignore. I have reset the repo with heroku repo:reset -a appname. I have looked online and this is what is mostly recommended in this case.

I was wondering what causes a large slug size. My app has a lot of media files (audio, video, image) that need to be uploaded. Can that cause the slug size to be too big? Even so the total size of the file of the app is less than 300 M.

I would appreciate any help. Thank you!

1 个答案:

答案 0 :(得分:1)

的大小不只是您的Python脚本。这是您的GIT存储库中的所有文件。因此,是的,拥有大量媒体文件会增加您的文件大小,这可能是您在此处出现问题的原因。

您是否考虑过将这些文件上传到S3等提供程序? 这样,它们就不会算作您的子弹了,您只需将新文件上传到S3中即可添加新文件,而无需重新部署Heroku应用。