vim gitlab.rb
去掉下面的注释
unicorn['worker_processes'] = 2 # core数+1;cat /proc/cpuinf
unicorn['worker_timeout'] = 60
postgresql['shared_buffers'] = "256MB" #缓存还可以再小
postgresql['max_worker_processes'] = 8 #并发数
sidekiq['concurrency'] = 25 #默认 减小并发数
unicorn['worker_memory_limit_min'] = "200 * 1 << 20" # 这是改小
unicorn['worker_memory_limit_max'] = "300 * 1 << 20"
之后执行
docker exec -it gitlab gitlab-ctl reconfigure
docker exec -it gitlab gitlab-ctl restart
如果访问不了,直接重启容器