title: set JVM memory limit for Jhipster application started by Gradle bootRun
body: <p>I have app generated by Jhipster (using gradle).</p>
  
  <p>The problem of setting JVM options -Xmx -Xms is specific when app started from gradle (bootRun).</p>
  
  <p>I was looking for solution in stackoverflow and tried many advices from forums .... but none worked for me. Java application took a lot of memory. 
  In the case of more microservices (more JVMs) Java consumes so much memory that it is unusable. </p>
  
  <p>I tried many options like </p>
  
  <ul>
  <li><p>modify build.gradle</p></li>
  <li><p>set options from command line</p></li>
  <li><p>use environment variable </p></li>
  </ul>
  
  <p>.... but gradle ignored it always.</p>
  
  <p>using gradle ver:
  gradlew --version</p>
  
  <p>Gradle 4.9</p>
  
  <p>Build time:   2018-07-16 08:14:03 UTC
  Revision:     efcf8c1cf533b03c70f394f270f46a174c738efc</p>
  
  <p>Kotlin DSL:   0.18.4
  Kotlin:       1.2.41
  Groovy:       2.4.12
  Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
  JVM:          1.8.0_172 (Oracle Corporation 25.172-b11)
  OS:           Linux 4.9.0-6-amd64 amd64</p>
  
  <p>Limiting memory for Jhipster app works fine if starting apps as docker container.</p>