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
Top comments (0)