【问题标题】:Heroku Django App deployment timeoutHeroku Django App 部署超时
【发布时间】:2014-02-26 19:36:03
【问题描述】:

在过去的几个月里,我已经多次将这个 django 应用程序部署到 heroku。今天我在部署时遇到了超时,即使我没有更改任何配置。 Cleaning up.. 步骤需要很长时间,然后在 Collecting static files 步骤上失败。最近有人遇到过这个问题吗?是基础设施问题还是 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'

【问题讨论】:

  • collectstatic 命令是否正在等待用户输入?您可以传递--noinput,这样它就不会提示任何内容。 Link to the docs.
  • 不,我在 heroku 上禁用了 collectstatic。配置可能已更改或其他内容。我将其重置为禁用,并设置了一个显式的 python 运行时并删除了一些我在外部加载的 pip 依赖项。事情现在似乎正在奏效。谢谢!

标签: python ruby-on-rails django heroku


【解决方案1】:

一些事情让这个工作。

Disable collectstatic

$ heroku labs:enable user-env-compile
$ heroku config:set DISABLE_COLLECTSTATIC=1

Add explicit python runtime。就我而言,我只是坚持使用我拥有的工作版本,即 python-2.7.4

从您的requirements.txt 中删除不必要的外部依赖项。现在这可以是特定于应用程序的,但我有一个自定义的pil 和一个我不需要在外部安装的 django 模块(来自 bitbucket)。这以前从来不是问题。但是我删除了它们以防万一 - Everytime I deploy to heroku I get a Timeout error

【讨论】:

    猜你喜欢
    • 2022-01-22
    • 1970-01-01
    • 2014-08-21
    • 2021-03-27
    • 1970-01-01
    • 1970-01-01
    • 2021-09-22
    • 1970-01-01
    • 2013-07-04
    相关资源
    最近更新 更多