# java.lang.StackOverflowError is thrown when maven sonar:sonar is running

**URL:** <https://community.sonarsource.com/t/java-lang-stackoverflowerror-is-thrown-when-maven-sonar-sonar-is-running/26429>\
**Category:** SonarQube Cloud\
**Tags:** maven, sonarqube, sonarqube-cloud, java\
**Created:** [June 15, 2020, 7:00pm UTC](https://community.sonarsource.com/t/java-lang-stackoverflowerror-is-thrown-when-maven-sonar-sonar-is-running/26429 "2020-06-15T19:00:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![telecominfraproject](https://avatars.discourse-cdn.com/v4/letter/t/3be4f8/32.png) [@telecominfraproject](https://community.sonarsource.com/u/telecominfraproject)\
**Post date:** [June 19, 2020, 6:30pm UTC](https://community.sonarsource.com/t/java-lang-stackoverflowerror-is-thrown-when-maven-sonar-sonar-is-running/26429/2 "2020-06-19T18:30:02Z")

</div>

Solved, limiting heap and increasing stack size helped: `MAVEN_OPTS: -Xmx3g -Xss2m`

---

_[View the full topic](https://community.sonarsource.com/t/java-lang-stackoverflowerror-is-thrown-when-maven-sonar-sonar-is-running/26429)._
