Hi ,
we were using Sonarqube 6.7.5 community edition in Datacenter and as part of cloud migration we deployed sonarqube (9.7.1 version - community edition ) in AWS
and we often face multiple issues in analysis,where
the analysis takes a longer time to get completed which was running for a few minutes in old sonarqube versions
or sometimes it takes a longer time to get started itself after submitting
enabled DEBUG mode and went through the CE logs but nothing major was found apart from the below ones.
sonar configuration that we use ,is there anything that we wanted to add to avoid these performance issues.
cat /apps/sonarqube_latest/conf/sonar.properties | grep -v ‘^#|^$’
sonar.jdbc.username=username
sonar.jdbc.password=secret
sonar.jdbc.url=sonarqube_endpoint
sonar.web.javaOpts=-Xmx3G -Xms3G -XX:+HeapDumpOnOutOfMemoryError
sonar.ce.javaOpts=-Xmx3G -Xms3G -XX:+HeapDumpOnOutOfMemoryError
sonar.search.javaOpts=-Xmx3G -Xms3G -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError
sonar.search.javaAdditionalOpts=-Djava.security.policy=/apps/sonarqube_latest/elasticsearch/config/security.policy
http.proxyHost=outbound-proxy.services.aws.fico.com
http.proxyPort=3128
https.proxyHost=outbound-proxy.services.aws.fico.com
https.proxyPort=3128
sonar.log.level=INFO
sonar.path.data=/apps/sq-shared/data
sonar.path.temp=/apps/sq-shared/temp
CE logs:
tail -f ce.log
2023.07.20 10:41:43 DEBUG ce[][o.i.c.TaskRunner] Q10000 finished run in 107 µs: OkHttp ConnectionPool
2023.07.20 10:41:53 DEBUG ce[AYly2SAb4ynx_oPxoYAK][o.s.s.w.WebHooksImpl] Failed to send webhook 'pblue-webhook' | url=https://pblue-dev-jenkins.aws.fico.com/sonarqube-webhook/ | message=Socket closed
2023.07.20 10:41:53 INFO ce[AYly2SAb4ynx_oPxoYAK][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=2 | projectWebhooks=0 | status=SUCCESS | time=10132ms
2023.07.20 10:41:53 DEBUG ce[AYly2SAb4ynx_oPxoYAK][o.s.c.a.AnnotationConfigApplicationContext] Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@696167f6, started on Thu Jul 20 10:38:02 UTC 2023, parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@7e483d02
2023.07.20 10:41:53 DEBUG ce[][c.z.h.p.HikariPool] HikariPool-1 - Before cleanup stats (total=10, active=0, idle=10, waiting=0)
2023.07.20 10:41:53 DEBUG ce[][c.z.h.p.HikariPool] HikariPool-1 - After cleanup stats (total=10, active=0, idle=10, waiting=0)
2023.07.20 10:41:53 DEBUG ce[][c.z.h.p.HikariPool] HikariPool-1 - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth=0).
2023.07.20 10:42:23 DEBUG ce[][c.z.h.p.HikariPool] HikariPool-1 - Before cleanup stats (total=10, active=0, idle=10, waiting=0)
2023.07.20 10:42:23 DEBUG ce[][c.z.h.p.HikariPool] HikariPool-1 - After cleanup stats (total=10, active=0, idle=10, waiting=0)
2023.07.20 10:42:23 DEBUG ce[][c.z.h.p.HikariPool] HikariPool-1 - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth=0).
2023.07.20 10:58:53 DEBUG ce[][c.z.h.p.HikariPool] HikariPool-1 - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth=0).
2023.07.20 10:58:53 DEBUG ce[][c.z.h.pool.PoolBase] HikariPool-1 - Closing connection org.postgresql.jdbc.PgConnection@4dd5222a: (connection has passed idleTimeout)
ar.ce.task.projectanalysis.step.ExecuteVisitorsStep' via constructor to bean named 'jdk.internal.loader.ClassLoaders$AppClassLoader@8bcc55f-org.sonar.ce.task.projectanalysis.qualitymodel.SecurityReviewMeasuresVisitor'
2023.07.20 11:24:06 DEBUG ce[AYly35AU4ynx_oPxoYAb][o.s.c.p.PriorityBeanFactory] Autowiring by type from bean name 'jdk.internal.loader.ClassLoaders$AppClassLoader@8bcc55f-org.sonar.ce.task.projectanalysis.step.ExecuteVisitorsStep' via constructor to bean named 'jdk.internal.loader.ClassLoaders$AppClassLoader@8bcc55f-org.sonar.ce.task.projectanalysis.qualitymodel.NewSecurityReviewMeasuresVisitor'
2023.07.20 11:24:06 DEBUG ce[AYly35AU4ynx_oPxoYAb][o.s.c.p.PriorityBeanFactory] Autowiring by type from bean name 'jdk.internal.loader.ClassLoaders$AppClassLoader@8bcc55f-org.sonar.ce.task.projectanalysis.step.ExecuteVisitorsStep' via constructor to bean named 'jdk.internal.loader.ClassLoaders$AppClassLoader@8bcc55f-org.sonar.ce.task.projectanalysis.source.LastCommitVisitor'
2023.07.20 11:24:06 DEBUG ce[AYly35AU4ynx_oPxoYAb][o.s.c.p.PriorityBeanFactory] Autowiring by type from bean name 'jdk.internal.loader.ClassLoaders$AppClassLoader@8bcc55f-org.sonar.ce.task.projectanalysis.step.ExecuteVisitorsStep' via constructor to bean named 'jdk.internal.loader.ClassLoaders$AppClassLoader@8bcc55f-org.sonar.ce.task.projectanalysis.measure.MeasureComputersVisitor'
below community link , below talks about purging old data and not sure how much it would be helpful .
do refer screenshots for more info regarding the analysis time