SonarQube application down due to memory leak

We are running on 8.4.2 version, but yesterday it went down, went through all the logs from web.log we found there is “memory leak” error. It is AWS m4.xlarge machine which is having total 16 GB RAM, We allocated web: 4G, ce: 4G, search: 3G in the application level. Is it necessary to increase memory ? if yes please suggest on this.
2021.04.25 12:27:13 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [logback-3] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:\n java.base@11.0.7/jdk.internal.misc.Unsafe.park(Native Method)\n java.base@11.0.7/java.util.concurrent.locks.LockSupport.park(\n java.base@11.0.7/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(\n java.base@11.0.7/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(\n java.base@11.0.7/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(\n java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor.getTa

Hey there.

Typically these warnings are not the cause of any issue, but SonarQube not shutting down gracefully (there is a ticket in the backlog for this). I’d turn your attention to earlier log messages.

Hello Colin,

Thanks for the response, we are not able to find exact issue. I am sharing logs with you, can you help me to find out root cause.
es.2021-04-25.log (65.8 KB) ce.2021-04-25.log (235.5 KB)

2021.04.25 12:27:12 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [ce]: 137
2021.04.25 12:27:13 DEBUG app[o.s.a.p.ManagedProcessLifecycle] StopWatcher[ce] tryToMoveTo ce from STARTED to HARD_STOPPING => true
2021.04.25 12:27:13 DEBUG app[o.s.a.p.ManagedProcessLifecycle] StopWatcher[ce] tryToMoveTo ce from HARD_STOPPING to FINALIZE_STOPPING => true
2021.04.25 12:27:13 INFO app[o.s.a.SchedulerImpl] Process[ce] is stopped (1.1 MB)

Based on the web.log file it does look like a hard stop occured.

2021.04.25 12:27:13 INFO web[o.s.p.ProcessEntryPoint] Hard stopping process

Anything in your sonar.log file? Often, these kind of stops are the result of the underlying VM trying to restart, patch, etc. When SonarQube doesn’t shut down in time, it just kills the process.