This content originally appeared on DEV Community and was authored by Hisyam Johan
If you encounter this error while managing your GitLab instance:
gitlab-ce fail: postgresql: runsv not running
it means GitLabβs service supervision system (runit) isnβt running properly.
When runsv or runsvdir stops, GitLabβs internal services β including PostgreSQL, Redis, Sidekiq, and Unicorn/Puma β all fail to start.
Symptom
You may see one or more of these errors:
down: postgresql: runsv not running
down: redis: runsv not running
down: unicorn: runsv not running
And gitlab-ctl reconfigure might fail with:
ActiveRecord::DatabaseConnectionError:
PG::ConnectionBad: connection to server failed: No such file or directory
Root Cause
GitLab uses runit (managed by gitlab-runsvdir) to supervise all internal services.
If the gitlab-runsvdir process isnβt active, no service daemons (runsv) are started β even if you manually run gitlab-ctl start.
This can happen after:
A reboot where gitlab-runsvdir wasnβt auto-enabled.
Manual termination of the runsvdir process.
A system update or service interruption.
Quick Fix
Start the GitLab runit service manually:
sudo systemctl start gitlab-runsvdir
Then verify:
gitlab-ctl status
You should now see all GitLab services in run: state, e.g.:
run: postgresql: (pid 3214) 10s; run: log: (pid 1234) 100s
This content originally appeared on DEV Community and was authored by Hisyam Johan