用 Gitlab 官方包 Omnibus GitLab RPM 包安装后 Postgres 数据库无法启动,
通过 sudo gitlab-ctl reconfigure 启动时, 提示 [execute] pgsql:could not connect to server:
通过 sudo gitlab-ctl start 启动时, 提示 timeout:down:postgresql:ls, normally up, want up
- 查看/var/log/gitlab/postgres/current日志发现,
- FATAL: could not create shared memory segment: Cannot allocate memory
- 是由于共享内存无法分配造成的
修改 gitlab 配置文件
- /etc/gitlab/gitlab.rb, 例如
- postgresql['shared_buffers'] = "100MB"
重新执行 sudo gitlab-ctl reconfigure gitlab 可以正常启动了
来源: http://www.bubuko.com/infodetail-1970714.html