Skip to content

Gitaly: Continue startup if ulimit fails

#!/bin/sh
set -e # fail on errors

# Redirect stderr -> stdout
exec 2>&1



cd /var/opt/gitlab/gitaly

ulimit -n 15000

exec chpst -e /opt/gitlab/etc/gitaly/env -P \
  -U git:git \
  -u git:git \
  /opt/gitlab/embedded/bin/gitaly-wrapper /opt/gitlab/embedded/bin/gitaly /var/opt/gitlab/gitaly/config.toml

The current gitaly start script will fails when run from a platform not supporting ulimit changes (in a lxc container in my case). Ideally the script would not fail in that case and start gitaly.