Finally i have it done with few options and using own self-hoster runner:
variables:
SONAR_SCANNER_OPTS: "-Xmx3062m"
services:
docker:
memory: 8192
docker-sonar:
type: docker
memory: 6144
I know that file is big, but in my opinion it might take more time but should not fail.