Heroku H10错误 - Python

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Heroku H10错误 - Python相关的知识,希望对你有一定的参考价值。

我花了过去5个小时尝试在Heroku上部署我的应用程序并且它不能正常工作......它是一个python应用程序,当我在本地运行时它运行得非常好。

但是,当我部署到Heroku时,我收到以下错误:

2014-06-19T20:16:28.240849+00:00 heroku[api]: Enable Logplex by cahnda@gmail.com
2014-06-19T20:16:28.240931+00:00 heroku[api]: Release v2 created by cahnda@gmail.com
2014-06-19T20:18:27+00:00 heroku[slug-compiler]: Slug compilation started
2014-06-19T20:19:20+00:00 heroku[slug-compiler]: Slug compilation failed: failed to          compile Python app

2014-06-19T20:21:33+00:00 heroku[slug-compiler]: Slug compilation started
2014-06-19T20:22:12+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Python app
2014-06-19T20:23:28+00:00 heroku[slug-compiler]: Slug compilation started
2014-06-19T20:24:11+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Python app
2014-06-19T20:27:12+00:00 heroku[slug-compiler]: Slug compilation started
2014-06-19T20:27:50+00:00 heroku[slug-compiler]: Slug compilation finished
2014-06-19T20:27:50.659666+00:00 heroku[api]: Deploy 95e0979 by cahnda@gmail.com
2014-06-19T20:27:50.577906+00:00 heroku[api]: Scale to web=1 by cahnda@gmail.com
2014-06-19T20:27:50.659724+00:00 heroku[api]: Release v3 created by cahnda@gmail.com
2014-06-19T20:27:57.641496+00:00 heroku[web.1]: State changed from starting to up
2014-06-19T20:27:59.423572+00:00 heroku[web.1]: State changed from up to crashed
2014-06-19T20:27:59.424174+00:00 heroku[web.1]: State changed from crashed to starting
2014-06-19T20:27:56.011407+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2014-06-19T20:27:59.409009+00:00 heroku[web.1]: Process exited with status 3
2014-06-19T20:28:06.601752+00:00 heroku[web.1]: State changed from starting to crashed
2014-06-19T20:28:08.016745+00:00 heroku[router]: at=error code=H10 desc="App crashed" 
method=GET path="/" host=secure-fjord-2980.herokuapp.com request_id=9fcc7ffe-3c5b-406c-   aaed-87c9fa8c8523 fwd="68.173.78.212" dyno= connect= service= status=503 bytes=
2014-06-19T20:28:08.265595+00:00 heroku[router]: at=error code=H10 desc="App crashed" 
method=GET path="/" host=secure-fjord-2980.herokuapp.com request_id=e1920daf-4cfc-466d-ba56-7f923ac6c7d9 fwd="68.173.78.212" dyno= connect= service= status=503 bytes=   
2014-06-19T20:28:08.708322+00:00 heroku[router]: **at=error code=H10 desc="App crashed"** 
method=GET path="/favicon.ico" host=secure-fjord-2980.herokuapp.com request_id=a8f085da-ce20-40ed-8882-d1d848538b23 fwd="68.173.78.212" dyno= connect= service= status=503 bytes=

这是什么意思?我该怎么做才能解决这个问题?请帮忙!

答案

H10错误可能是一种痛苦。因为H10是一般错误并且没有提供堆栈跟踪,所以很难理解窗帘后面发生了什么。不久前,我了解到在Heroku上解决H10错误(app crashed)的最快方法是使用Sentry

它通过电子邮件向您发送堆栈跟踪(或者您可以使用Web应用程序上的仪表板)。

如果您的应用程序是Django应用程序,那么您甚至可以跳过Sentry并配置ADMINS和电子邮件以发送日志记录报告。见error reporting in Django

以上是关于Heroku H10错误 - Python的主要内容,如果未能解决你的问题,请参考以下文章

Spring Boot应用程序在Heroku代码= H10上崩溃

Heroku 产生错误 H10 并导致应用程序崩溃

带有 Maven 应用程序的 Spring Boot 的 Heroku jar 部署,代码 = H10

将 JS 应用程序部署到 Heroku - 错误 H10 503 错误,应用程序崩溃

Flask Heroku 部署的 Librosa 安装:“OSError: sndfile library not found”(H10 错误)

Heroku 错误代码:Elifecycle +更多未知数