title: Deploying to Heroku crash: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch
body: <p>I get this error after deploying my springboot application in Heroku:</p>
  
  <pre><code>2019-12-12T19:09:35.340701+00:00 heroku[web.1]: State changed from starting to crashed
  2019-12-12T19:09:35.088497+00:00 heroku[web.1]: Error R10 (Boot timeout) -&gt; Web process failed to bind to $PORT within 90 seconds of launch
  2019-12-12T19:09:35.088497+00:00 heroku[web.1]: Stopping process with SIGKILL
  2019-12-12T19:09:35.319755+00:00 heroku[web.1]: Process exited with status 137
  2019-12-12T19:16:46.351647+00:00 heroku[web.1]: State changed from crashed to starting
  2019-12-12T19:16:50.604492+00:00 heroku[web.1]: Starting process with command `java -Dserver.port=35960 $JAVA_OPTS -jar build/libs/*.jar`
  </code></pre>
  
  <p>So I tried to make a Procfile on the root folder of my project and this is the content:</p>
  
  <p>Procfile:</p>
  
  <pre><code>web: java -Dserver.port=$PORT -jar build/libs/*.jar
  </code></pre>
  
  <p>I also added this line to my application.properties file.</p>
  
  <p>application.properties:</p>
  
  <pre><code>server.port=${PORT:5000}
  </code></pre>
  
  <p>However, it's still not working.
  The error above is still happening. How do I fix this? What else am I missing?</p>
  
  <p>I'm using gradle, java11 and spring boot.</p>