Flask App Won't Run On Heroku
It runs fine when I run it locally from Heroku. In the logs, the error I'm getting is a timeout error. from flask import Flask, render_template, request import requests import jso
Solution 1:
As the logs state:
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
You are not binding to the provided PORT
variable and so Heroku terminates your program. If you just want to play around with Heroku + Flask then simply change your __main__
line to:
if __name__ == '__main__':
from os import environ
app.run(debug=False, port=environ.get("PORT", 5000), processes=2)
If this needs to handle more than two concurrent connections you will probably want to see the section of Flask's docs on deploying into standard WSGI containers.
Post a Comment for "Flask App Won't Run On Heroku"