我剛剛在Heroku上有一個關於運行燒瓶的簡單問題。我不確定自己做錯了什麼,但我很新,所以請原諒愚蠢的錯誤。Heroku上的燒瓶大量的500錯誤,在開發機器上運行
我使用Flask在Heroku上部署應用程序。爲確保實施過程中出現最小的錯誤,代碼直接從https://github.com/orf/simple中獲取。遵循這個https://devcenter.heroku.com/articles/python我做了一些小的調整。當我在開發機器上運行時(通過python simple.py),該程序工作正常,但該程序在heroku上遇到了一致的內部服務器錯誤。日誌已附加。
有什麼想法?
2012-06-23T02:43:47+00:00 heroku[api]: Deploy 69a4995 by *********@gmail.com
2012-06-23T02:43:47+00:00 heroku[web.1]: State changed from up to bouncing
2012-06-23T02:43:47+00:00 heroku[web.1]: State changed from bouncing to created
2012-06-23T02:43:47+00:00 heroku[web.1]: State changed from created to starting
2012-06-23T02:43:47+00:00 heroku[slugc]: Slug compilation finished
2012-06-23T02:43:49+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2012-06-23T02:43:49+00:00 heroku[web.1]: Starting process with command `gunicorn simple:app -b 0.0.0.0:25399 -w 3`
2012-06-23T02:43:49+00:00 app[web.1]: 2012-06-23 02:43:49 [5] [INFO] Worker exiting (pid: 5)
2012-06-23T02:43:49+00:00 app[web.1]: 2012-06-23 02:43:49 [7] [INFO] Worker exiting (pid: 7)
2012-06-23T02:43:49+00:00 app[web.1]: 2012-06-23 02:43:49 [2] [INFO] Handling signal: term
2012-06-23T02:43:49+00:00 app[web.1]: 2012-06-23 02:43:49 [6] [INFO] Worker exiting (pid: 6)
2012-06-23T02:43:49+00:00 app[web.1]: 2012-06-23 02:43:49 [2] [INFO] Shutting down: Master
2012-06-23T02:43:50+00:00 app[web.1]: 2012-06-23 02:43:50 [2] [INFO] Starting gunicorn 0.13.4
2012-06-23T02:43:50+00:00 app[web.1]: 2012-06-23 02:43:50 [2] [INFO] Listening at: http://0.0.0.0:25399 (2)
2012-06-23T02:43:50+00:00 app[web.1]: 2012-06-23 02:43:50 [2] [INFO] Using worker: sync
2012-06-23T02:43:50+00:00 app[web.1]: 2012-06-23 02:43:50 [6] [INFO] Booting worker with pid: 6
2012-06-23T02:43:50+00:00 app[web.1]: 2012-06-23 02:43:50 [5] [INFO] Booting worker with pid: 5
2012-06-23T02:43:50+00:00 app[web.1]: 2012-06-23 02:43:50 [7] [INFO] Booting worker with pid: 7
2012-06-23T02:43:50+00:00 heroku[web.1]: Process exited with status 0
2012-06-23T02:43:51+00:00 heroku[web.1]: State changed from starting to up
2012-06-23T02:45:00+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=21ms status=500 bytes=291
2012-06-23T02:45:01+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=14ms status=404 bytes=238
2012-06-23T02:45:01+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=3ms status=500 bytes=291
2012-06-23T02:45:01+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=15ms status=404 bytes=238
2012-06-23T02:45:02+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=5ms status=500 bytes=291
2012-06-23T02:45:02+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=2ms status=500 bytes=291
2012-06-23T02:45:02+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=4ms status=500 bytes=291
2012-06-23T02:45:02+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=3ms status=500 bytes=291
2012-06-23T02:45:02+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=3ms status=500 bytes=291
2012-06-23T02:45:02+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=5ms status=500 bytes=291
2012-06-23T02:45:02+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=2ms status=500 bytes=291
2012-06-23T02:45:03+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=2ms status=500 bytes=291
2012-06-23T02:45:03+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=4ms status=500 bytes=291
2012-06-23T02:45:03+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=4ms status=500 bytes=291
2012-06-23T02:45:03+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=2ms status=404 bytes=238
2012-06-23T02:45:32+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=2ms status=500 bytes=291
2012-06-23T02:45:32+00:00 heroku[router]: GET deep-rain-4577.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=13ms status=404 bytes=238
您是否嘗試過使用本地計算機上的工頭?這可能是因爲你的requirements.txt不完整。 – Apalala
有一百個原因讓你的應用程序不能立即在heroku上工作。錯誤500只是意味着您的應用程序中存在異常。您應該嘗試獲取堆棧跟蹤以瞭解更多關於該問題的信息。一些''logging.basicConfig(level = logging.DEBUG)''可能會訣竅。 – madjar