title: Reduce Embedded Tomcat startup time on Prod profile
body: <p>I am running a basic Jhipster generated app - see bottom for setup details - that is to be run on a single basic Heroku dyno for the time being. I use the embedded tomcat approach and all is working out fine apart from the start-up time on the production profile.</p>
  
  <p>Running the server locally on my machine with Foreman I get the following results:</p>
  
  <ul>
  <li>On the dev profile I get start-up times of &lt;30sec for both the local and the remote Heroku database.</li>
  <li>On the prod profile this goes up to >100sec for both cases.</li>
  </ul>
  
  <p>This causes Heroku to terminate the instance before start-up completes due to them requiring the server to bind to their designated port within 60 seconds.</p>
  
  <p>Thus my question is how/if I could reduce that time. I am aware of Heroku offering to increase the timeout interval to 120sec on a per-application basis. I would appreciate a more elegant approach, though, especially since I am running on a basic dyno so that timeout extension might not even be sufficient.</p>
  
  <p>I know of Jetty/WebappRunner, too, but would prefer to stick to the simpler embedded tomcat setup if at all possible.</p>
  
  <p>Finally, I have seen that for Rails there is the possibility of employing a proxy during start-up to bind to Heroku's port right away - I did not find a Spring equivalent, though.</p>
  
  <p>Thanks in advance!</p>
  
  <hr>
  
  <p>Setup</p>
  
  <ul>
  <li>jhipster v017.2</li>
  <li>authenticationType": "token"</li>
  <li>hibernateCache": "no"</li>
  <li>clusteredHttpSession": "no"</li>
  <li>websocket": "no"</li>
  <li>databaseType": "sql"</li>
  <li>devDatabaseType": "postgresql"</li>
  <li>prodDatabaseType": "postgresql"</li>
  <li>useCompass": true</li>
  <li>buildTool": "maven",</li>
  <li>frontendBuilder": "grunt"</li>
  <li>javaVersion": "7"</li>
  </ul>