linux修改gitlab配置文件,解决gitlab占用大量内存的问题
gitlab默认情况会开 【线程数+物理cpu个数(非核数)】 个进程,所以会吃大量内存,主要是bundle的吃内存。
解决办法
修改/etc/gitlab/gitlab.rb
#2019-12-4 add by lishuo start
unicorn['worker_processes'] = 4
#2019-12-4 add by lishuo end
#2019-12-4 add by lishuo start
postgresql['max_worker_processes'] = 4
#2019-12-4 add by lishuo end
#2019-12-4 add by lishuo start
nginx['worker_processes'] = 4
#2019-12-4 add by lishuo end
然后执行命令
gitlab-ctl reconfigure #gitlab会读取配置文件参数并修改各个插件的配置文件去(我猜的)
gitlab-ctl restart