[英]Heroku Django App deployment timeout
I have been deploying this django app to heroku several times over the past few months. 在过去的几个月中,我已经多次将此Django应用程序部署到heroku。 Today I'm hitting a timeout while deploying even though I haven't changed any configuration. 今天,即使我没有更改任何配置,在部署时也会遇到超时。 The Cleaning up..
step takes a long time and then it just fails on Collecting static files
step. “ Cleaning up..
步骤需要花费很长时间,然后在“ Collecting static files
步骤中失败。 Has anyone faced this issue recently? 最近有人遇到这个问题吗? Is it an infrastructure problem or python version change or something else? 是基础架构问题还是python版本更改或其他问题?
Cleaning up...
-----> Collecting static files
! Timed out compiling Python app (15 minutes)
! See https://devcenter.heroku.com/articles/slug-compiler#time-limit
Auto packing the repository for optimum performance.
To git@heroku.com:x.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:x.git'
A couple of things that got this to work. 有几件事使它起作用。
$ heroku labs:enable user-env-compile
$ heroku config:set DISABLE_COLLECTSTATIC=1
Add explicit python runtime . 添加显式python运行时 。 In my case I just stuck to the working version I had ie python-2.7.4 就我而言,我只是坚持使用的工作版本即python-2.7.4
Remove unnecessary external dependencies from your requirements.txt
. 从您的requirements.txt
删除不必要的外部依赖项。 Now this can be application specific but I had a custom pil
and a django module that I did not really need being installed externally (from bitbucket). 现在这可以是特定于应用程序的,但是我有一个自定义pil
和django模块,这些模块实际上并不需要(从bitbucket)安装在外部。 This never was a problem before. 以前从来都不是问题。 But I removed them just in case of this - Everytime I deploy to heroku I get a Timeout error 但是为了避免这种情况,我删除了它们- 每当我部署到heroku时,都会收到超时错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.