Background Tasks on in progress more than one day

sonarqube

(Jenkins Aprisma) #1

Hi All,
I use SonarQube v 6.7.5, when i scanned a specific project, i wait for more than a day but the background task is still running.
Because this happened repeatedly, there are failed and aborted analysis. it has been 1 month and still failed or need to be aborted.
Did you know why? Any solution?

If you need further information, please ask me.
Thanks


(G Ann Campbell) #2

Hi,

Are logs available for the processing of those hung/failed tasks?

 
Ann


(Duarte Meneses) #3

Hello,
I’ll go ahead and already say that If you don’t have relevant logs (particularly in ce.log), or if the task just hangs, you could try:

  • Activate debug logs, by adding the property sonar.log.level.ce=DEBUG
  • Get the stack of the threads in the CE process (jstack [pid])

(Jenkins Aprisma) #4

Here is my Application and DB VM specs:
App VM Server :

  • RAM : 8GB
  • Processor : 10

DB VM Server

  • RAM : 1GB
  • Processor : 1

Is there any information I need to provide to figure out the problems?
I assume it might DB VM server RAM is too small, do you think I need to upgrade DB VM?

Thanks


(Jenkins Aprisma) #5

I have attached the log…

Please check…
Thank you


(G Ann Campbell) #6

Hi,

Thanks for the log snippets. For future reference, text snippets are far easier to digest/deal with than screenshots.

Nonetheless, your ce.log snippet shows a problem communicating with the database. You should investigate that.

 
Ann


(Jenkins Aprisma) #7

Hi @ganncamp

I have investigated DB server but found nothing wrong.

I have many projects and it only happened to this one specific project. I have increase max_allowed_packet and it still not working. The size of this project after compiling is around 600mb. Maybe more if compiling is not failed.

Any idea?


(G Ann Campbell) #8

Hi,

I don’t know how to get past

Selection_156

but if you really want to pursue this on the SonarQube side, we’ll need fuller logs of the problem, hopefully copy/pasted (and formatted :slight_smile:) as text.

 
Ann


(Jenkins Aprisma) #9

web_log_sonar.txt (5.3 KB)

Here’s full log.

Thanks :blush:


(G Ann Campbell) #10

Hi,

Your log indicates that MySQL raised an Out of Memory Error

Caused by: java.sql.SQLException: Out of memory (Needed 84618072 bytes)
  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)

So this is on your database side.

 
Ann


(Jenkins Aprisma) #11

Hi @ganncamp,
I have fixed the problem with upgrading the server and database. Now, I wanna ask :

  1. After upgrading, i retry to scan the project by sonar, but the background task was never end.

  2. I scan the same project with different project name and project key in sonar, it was successful.

Because of endless background task, i often restart the SonarQube server, and until now for the next scan it’s never successful to complete the background task.
is there another step to rescan the case number 1 successfully?

Thankyou


(G Ann Campbell) #12

Hi,

Sorry, there’s no way to restart a background task.

 
Ann