gitlabhq-13.7.3 fails to start in OpenRC
The current init script gets stuck when starting Sidekiq. It spawns many hundreds of sidekiq processes, which quickly eat up all of the machine's CPU and memory. Even after starting Sidekiq, it doesn't daemonize, so the init script doesn't move onto the next step. I was only able to stop it by removing gitlabhq
from rc-update and forcing a restart.
I found the causes of the two issues:
- The
sidekiq_processes
definition on line 29 needs to escape the *'s, as the shell is expanding them into filenames in the current directory, leading to the spawning of several hundred Sidekiq processes. - The
sidekiq_start_command_args
definition on line 31 is missing the-d
flag, which would daemonize the Sidekiq processes.
I'm attaching my modified version of the init script that is working for me.