Upgrading from 13.12 to 14.0

The easiest thing for you to do to switch from unicorn to puma is go into /etc/gitlab/gitlab.rb and edit this file. Find the lines with unicorn on them and place a # in front of the lines to comment them out.

Here is how my gitlab.rb looks, and this is one from at least Gitlab 12 or earlier:

root@repo:/etc/gitlab# cat gitlab.rb | grep -i unicorn
###! Time between sampling of unicorn socket metrics, in seconds
# gitlab_rails['monitoring_unicorn_sampler_interval'] = 10
## GitLab Unicorn
##! Tweak unicorn settings.
##! Docs: https://docs.gitlab.com/omnibus/settings/unicorn.html
# unicorn['worker_timeout'] = 60
# unicorn['worker_processes'] = 2
# unicorn['listen'] = '127.0.0.1'
# unicorn['port'] = 8080
# unicorn['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket'
# unicorn['pidfile'] = '/opt/gitlab/var/unicorn/unicorn.pid'
# unicorn['tcp_nopush'] = true
# unicorn['backlog_socket'] = 1024
# unicorn['somaxconn'] = 1024
# unicorn['log_directory'] = "/var/log/gitlab/unicorn"
###! Docs: https://about.gitlab.com/2015/06/05/how-gitlab-uses-unicorn-and-unicorn-worker-killer/
###!       https://github.com/kzk/unicorn-worker-killer
# unicorn['worker_memory_limit_min'] = "400 * 1 << 20"
# unicorn['worker_memory_limit_max'] = "650 * 1 << 20"

that’s the only lines relating to unicorn at least in mine. Once commented out, then do:

gitlab-ctl reconfigure

now it should automatically start to use puma, since any lines relating to unicorn are now disabled. Then try your upgrade again.

As I said, your file might have different lines with unicorn on them, so just find them all and comment them out.

I don’t have any puma lines in my file so it’s using the defaults. Once you have it running, you can look at tuning puma later if you really need to.

3 Likes