mrQWERTY
mrQWERTY

Reputation: 4149

SonarQube - Java Heap Error

I have several modules that do not contain source code in a maven multimodule project. When SonarQube analyses these modules, it would pause and give out the following warning :

Load module settings
00:40:47.304 [WARN] [09:29:52.769] [JOURNAL_FLUSHER] WARNING Journal flush operation took 2,123ms last 8 cycles average is 265ms
00:41:54.102 [WARN] [09:31:02.653] [JOURNAL_FLUSHER] WARNING Journal flush operation took 5,194ms last 8 cycles average is 649ms
00:42:37.907 [WARN] [09:31:48.387] [JOURNAL_FLUSHER] WARNING Journal flush operation took 3,927ms last 8 cycles average is 616ms
00:44:41.930 [WARN] [09:33:55.362] [JOURNAL_FLUSHER] WARNING Journal flush operation took 6,855ms last 8 cycles average is 856ms
00:45:48.276 [WARN] [09:34:51.298] [JOURNAL_FLUSHER] WARNING Journal flush operation took 3,144ms last 8 cycles average is 524ms
00:47:10.063 [WARN] [09:36:20.541] [JOURNAL_FLUSHER] WARNING Journal flush operation took 7,876ms last 8 cycles average is 984ms
00:48:26.295 [WARN] [09:37:39.723] [JOURNAL_FLUSHER] WARNING Journal flush operation took 12,296ms last 8 cycles average is 1,537ms
00:48:30.084 [ERROR] Java heap space

Is this error occurring because there are no source code inside or is there a corrupt file in there? Here are the contents of one of those module that exhibit this error:

module_1/
  feature.xml
  build.properties

I know that there is an option to skip modules, but since I am using SonarQube 4.3.2, it is deprecated. Is there anyway to avoid those modules or perhaps another way to fix this error?

EDIT: I found out that this error is probably not caused by empty modules as it displays this error on even full modules. So therefore, it is probably something wrong with my MAVEN_OPTS confiuration. Here is my MAVEN_OPTS configuration: -Xmx4096m -XX:MaxPermSize=1000m -Xms4096m

This computer has 8 gb of Ram, so memory is not an issue.

Thank you.

Upvotes: 3

Views: 2156

Answers (1)

sunnyX
sunnyX

Reputation: 87

I had the same problem where it used to hung on Journal Flushing and ultimately timeout at whatever the value i set in Findbags Java default timeout in sonarqube.

I resolved this by using the following options while running the sonar maven command:- MAVEN_OPTS="-Xms256m -Xmx4096m -XX:+UseSerialGC"

This has fixed the issue for me.

The post which helped me:- http://sonarqube-archive.15.x6.nabble.com/SonarQube-terminates-at-quot-Journal-Flusher-quot-warning-and-heap-size-error-td5027066.html

Upvotes: 1

Related Questions