title: Unable to run flask in heroku
body: <p>I'm getting app crash whenever I run my flask application in heroku</p>
  <pre><code>**This the log I get**
  2021-05-07T08:16:12.395679+00:00 heroku[web.1]: Starting process with command `waitress-serve --listen=0.0.0.0:33507 main:create_app`
  2021-05-07T08:16:16.056323+00:00 app[web.1]: INFO:waitress:Serving on http://0.0.0.0:33507
  2021-05-07T08:16:23.146656+00:00 heroku[router]: at=error code=H20 desc=&quot;App boot timeout&quot; method=GET path=&quot;/&quot; host=malibu-luxury.herokuapp.com request_id=c81fd09c-29e6-48ed-bb32-73ee6f5f29bc fwd=&quot;49.205.79.67&quot; dyno= connect= service= status=503 bytes= protocol=https
  2021-05-07T08:17:13.001979+00:00 heroku[web.1]: Error R10 (Boot timeout) -&gt; Web process failed to bind to $PORT within 60 seconds of launch
  2021-05-07T08:17:13.050236+00:00 heroku[web.1]: Stopping process with SIGKILL
  2021-05-07T08:17:13.142541+00:00 heroku[web.1]: Process exited with status 137
  2021-05-07T08:17:13.216370+00:00 heroku[web.1]: State changed from starting to crashed
  2021-05-07T08:17:15.352721+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=GET path=&quot;/&quot; host=malibu-luxury.herokuapp.com request_id=fd3e869a-7515-45c3-ace8-a322b6969c65 fwd=&quot;49.205.79.67&quot; dyno= connect= service= status=503 bytes= protocol=https
  </code></pre>
  <p><strong>This is my flask code</strong></p>
  <pre><code>
  import MySQLdb.cursors
  import re
  import os
  from importlib import reload
  def get_port():
    return int(os.environ.get(&quot;PORT&quot;, 33507))
      return (delta.days)
  def create_app():
      app = Flask(__name__)
  .
  .
  .
          app.run(debug=True,host='0.0.0.0',port=get_port())
      return app  
  </code></pre>
  <p><strong>This is my procfile</strong>
  <code>web: waitress-serve --listen=0.0.0.0:33507 main:create_app</code></p>