DEV Community

Hisyam Johan
Hisyam Johan

Posted on

šŸ›  Fixing ā€œrunsv not runningā€ Error in GitLab CE

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
Enter fullscreen mode Exit fullscreen mode

And gitlab-ctl reconfigure might fail with:

ActiveRecord::DatabaseConnectionError:
PG::ConnectionBad: connection to server failed: No such file or directory
Enter fullscreen mode Exit fullscreen mode

šŸ’” 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)