Insufficient memory and cannot create worker GC thread

Make sure to tell us:

  • What version are you upgrading from?
    9.8.0 to 9.9.0 community edition
  • System information (Operating system, Java version, Database provider/version)
    Upgraded jdk to jdk17 also changed env variables from son.jdbc. to SONAR_JDBC_
  • What’s the issue you’re facing?
    Getting these error in container logs :-
    There is insufficient memory for the Java Runtime Environment to continue.
    Cannot create worker GC thread. Out of system resources.
    An error report file with more information is saved as:
    /tmp/hs_err_pid1.log
    [0.004s][warning][os,thread] Failed to start thread “GC Thread#0” - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.

Hey there.

Have you checked that you’ve assigned enough RAM?

I just checked the host memory usage:
(these are in GiB)
total used free shared buff/cache available
Mem: 7 4 0 0 2 2
Swap: 7 0 7

and also checked the container stats:

CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM %
contaienr_id sonarqube 0.59% 1.476GiB / 7.769GiB 19.00%

NET I/O BLOCK I/O PIDS
405MB / 598MB 153MB / 198MB 195

OS: Red Hat Enterprise Linux 8.6
also my docker engine version is 20.10.6

@Colin : Can you please help.

Issue resolved after upgrading docker engine to 23.0 on RHEL 8.6.
Referred to this article:
[Memory error on upgrade - SonarQube / 9.9 LTS Upgrade - Sonar Community (sonarsource.com)]

1 Like