When I tried to upgrade from 16.6.2 to 16.7.2, Gitlab UI was down, getting 502. Ran top and noticed Puma worker processes consuming 100% CPU.
Below is the error logs for /var/log/gitlab/puma
=== puma startup: 2024-01-14 13:25:03 +0100 ===
bundler: failed to load command: puma (/opt/gitlab/embedded/bin/puma)
/ssd_storage/gitlab/opt/embedded/lib/ruby/gems/3.1.0/gems/connection_pool-2.4.1/lib/connection_pool.rb:72:in `_fork': Cannot allocate memory - fork(2) (Errno::ENOMEM)
from /ssd_storage/gitlab/opt/embedded/lib/ruby/gems/3.1.0/gems/connection_pool-2.4.1/lib/connection_pool.rb:72:in `_fork'
from /ssd_storage/gitlab/opt/embedded/lib/ruby/gems/3.1.0/gems/activesupport-7.0.8/lib/active_support/fork_tracker.rb:7:in `_fork'
from /ssd_storage/gitlab/opt/embedded/lib/ruby/gems/3.1.0/gems/puma-6.4.0/lib/puma/cluster.rb:99:in `fork'
from /ssd_storage/gitlab/opt/embedded/lib/ruby/gems/3.1.0/gems/puma-6.4.0/lib/puma/cluster.rb:99:in `spawn_worker'
from /ssd_storage/gitlab/opt/embedded/lib/ruby/gems/3.1.0/gems/puma-6.4.0/lib/puma/cluster.rb:81:in `block in spawn_workers'
After checking the gitlab.rb config, I set the puma worker processes to 3 from 8(default i guess) and gitlab UI comes up again. But that is a temporary fix, not sure what needs to be fix manually.
I checked the memory as well and it seems fine.
My system is:
NAME=“Ubuntu”
VERSION=“18.04.6 LTS (Bionic Beaver)”
ID=ubuntu
PRETTY_NAME=“Ubuntu 18.04.6 LTS”
VERSION_ID=“18.04”
HOME_URL=“https://www.ubuntu.com/”
SUPPORT_URL=“https://help.ubuntu.com/”
BUG_REPORT_URL=“Bugs : Ubuntu”
VERSION_CODENAME=bionic
Thanks in advance for the help