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
