title: Out of memory:java heap size in sonar?
body: <p>I am analysing a large project in Sonar and getting following error,</p>
  
  <pre><code>00:41:48.325 INFO  - Base dir: C:\Users\Administrator\Desktop\sonar-runner-dist-2.4\sonar-runner-2.4\bin\.
  00:41:48.325 INFO  - Working dir: C:\Users\Administrator\Desktop\sonar-runner-dist-2.4\sonar-runner-2.4\bin\.\.sonar
  00:41:48.325 INFO  - Source encoding: UTF-8, default locale: en_US
  00:41:48.325 INFO  - Quality profile for java: PMD
  00:41:48.332 INFO  - Sensor QProfileSensor...
  00:41:48.336 INFO  - Sensor QProfileSensor done: 4 ms
  00:41:48.336 INFO  - Sensor CpdSensor...
  00:41:48.336 INFO  - SonarEngine is used for java
  00:41:48.336 INFO  - Sensor CpdSensor done: 0 ms
  00:41:48.336 INFO  - Sensor InitialOpenIssuesSensor...
  00:41:48.486 INFO  - Sensor InitialOpenIssuesSensor done: 150 ms
  00:41:48.486 INFO  - Sensor ProfileEventsSensor...
  00:41:48.602 INFO  - Sensor ProfileEventsSensor done: 116 ms
  00:41:48.603 INFO  - Sensor ProjectLinksSensor...
  00:41:48.605 INFO  - Sensor ProjectLinksSensor done: 2 ms
  00:41:48.606 INFO  - Sensor VersionEventsSensor...
  00:41:48.631 INFO  - Sensor VersionEventsSensor done: 26 ms
  00:41:48.631 INFO  - Sensor FileHashSensor...
  00:41:48.631 INFO  - Sensor FileHashSensor done: 0 ms
  00:41:48.794 INFO  - Execute decorators...
  00:41:49.256 INFO  - Store results in database
  INFO: ------------------------------------------------------------------------
  INFO: EXECUTION FAILURE
  INFO: ------------------------------------------------------------------------
  Total time: 1:19:23.133s
  Final Memory: 11M/494M
  INFO: ------------------------------------------------------------------------
  ERROR: Error during Sonar runner execution
  org.sonar.runner.impl.RunnerException: Unable to execute Sonar
      at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
      at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
      at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
      at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
      at org.sonar.runner.api.Runner.execute(Runner.java:100)
      at org.sonar.runner.Main.executeTask(Main.java:70)
      at org.sonar.runner.Main.execute(Main.java:59)
      at org.sonar.runner.Main.main(Main.java:53)
  Caused by: java.lang.OutOfMemoryError: Java heap space
      at java.util.Arrays.copyOfRange(Arrays.java:2694)
      at java.lang.String.&lt;init&gt;(String.java:203)
      at java.lang.StringBuilder.toString(StringBuilder.java:405)
      at com.persistit.Value.get(Value.java:2143)
      at com.persistit.DefaultValueCoder$ObjectFieldAccessor.fromValue(DefaultValueCoder.java:560)
      at com.persistit.DefaultValueCoder.renderDefaultFields(DefaultValueCoder.java:1154)
      at com.persistit.DefaultValueCoder.render(DefaultValueCoder.java:1132)
      at com.persistit.DefaultValueCoder.get(DefaultValueCoder.java:1065)
      at com.persistit.Value.get(Value.java:2413)
      at com.persistit.encoding.CollectionValueCoder.render(CollectionValueCoder.java:220)
      at com.persistit.encoding.CollectionValueCoder.get(CollectionValueCoder.java:167)
      at com.persistit.Value.get(Value.java:2413)
      at com.persistit.DefaultValueCoder$ObjectFieldAccessor.fromValue(DefaultValueCoder.java:560)
      at com.persistit.DefaultValueCoder.renderDefaultFields(DefaultValueCoder.java:1154)
      at com.persistit.DefaultValueCoder.render(DefaultValueCoder.java:1132)
      at com.persistit.DefaultValueCoder.get(DefaultValueCoder.java:1065)
      at com.persistit.Value.get(Value.java:2413)
      at com.persistit.encoding.CollectionValueCoder.render(CollectionValueCoder.java:232)
      at com.persistit.encoding.CollectionValueCoder.get(CollectionValueCoder.java:167)
      at com.persistit.Value.get(Value.java:2413)
      at com.persistit.DefaultValueCoder$ObjectFieldAccessor.fromValue(DefaultValueCoder.java:560)
      at com.persistit.DefaultValueCoder.renderDefaultFields(DefaultValueCoder.java:1154)
      at com.persistit.DefaultValueCoder.render(DefaultValueCoder.java:1132)
      at com.persistit.DefaultValueCoder.get(DefaultValueCoder.java:1065)
      at com.persistit.Value.get(Value.java:2413)
      at com.persistit.Value.get(Value.java:2015)
      at org.sonar.batch.index.Cache$ValueIterator.next(Cache.java:400)
      at org.sonar.batch.index.Cache$ValueIterator.next(Cache.java:373)
      at org.sonar.core.issue.db.IssueStorage.batchInsert(IssueStorage.java:77)
      at org.sonar.core.issue.db.IssueStorage.save(IssueStorage.java:66)
      at org.sonar.batch.issue.IssuePersister.persist(IssuePersister.java:52)
      at org.sonar.batch.phases.PhaseExecutor.executePersisters(PhaseExecutor.java:163)
  ERROR:
  ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
  </code></pre>
  
  <p>Can any one help me in finding out error,i am analysing project by setting java heap to 2048m in wrapper.conf i got out of memory heap size,so i tired to set java heap size to 5120 and sonar-runner-opts to 8192 but still its failing at same point,</p>
  
  <p>These are the plugins which i have used abacus,checkstyles,pmd,java,useless code tracker
  Database:mysql</p>
  
  <p>Thanks in advance</p>