Hi @iwalker you’re right I have 4 vcpu, and puma wanted to start with 4 worker, but it couldn’t if I comment out the puma settings.
puma[‘port’] = 8085
#puma[‘worker_processes’] = 0
#puma[‘per_worker_max_memory_mb’] = 1024
But the fact is that, with the default settings, puma can’t start, restarting continously:
2024-02-08_12:35:35.51607 {"timestamp":"2024-02-08T12:35:35.515Z","pid":6818,"message":"* Listening on unix:///var/opt/gitlab/gitlab-rails/sockets/gitlab.socket"}
2024-02-08_12:35:35.51647 {"timestamp":"2024-02-08T12:35:35.516Z","pid":6818,"message":"* Listening on http://127.0.0.1:8085"}
2024-02-08_12:35:35.51665 {"timestamp":"2024-02-08T12:35:35.516Z","pid":6818,"message":"! WARNING: Detected 2 Thread(s) started in app boot:"}
2024-02-08_12:35:35.51680 {"timestamp":"2024-02-08T12:35:35.516Z","pid":6818,"message":"! #\u003cThread:0x00007fe1ce231538 /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/rack-timeout-0.6.3/lib/rack/timeout/support/scheduler.rb:73 sleep\u003e - /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/rack-timeout-0.6.3/lib/rack/timeout/support/scheduler.rb:91:in `sleep'"}
2024-02-08_12:35:35.51693 {"timestamp":"2024-02-08T12:35:35.516Z","pid":6818,"message":"! #\u003cThread:0x00007fe177e78a28 /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/sentry-ruby-5.10.0/lib/sentry/session_flusher.rb:81 sleep\u003e - /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/sentry-ruby-5.10.0/lib/sentry/session_flusher.rb:83:in `sleep'"}
2024-02-08_12:35:35.51713 {"timestamp":"2024-02-08T12:35:35.517Z","pid":6818,"message":"Use Ctrl-C to stop"}
2024-02-08_12:35:38.45807 {"timestamp":"2024-02-08T12:35:38.448Z","pid":7003,"message":"Puma starting in cluster mode..."}
2024-02-08_12:35:38.45826 {"timestamp":"2024-02-08T12:35:38.458Z","pid":7003,"message":"* Puma version: 6.4.0 (ruby 3.1.4-p223) (\"The Eagle of Durango\")"}
2024-02-08_12:35:38.45835 {"timestamp":"2024-02-08T12:35:38.458Z","pid":7003,"message":"* Min threads: 4"}
2024-02-08_12:35:38.45842 {"timestamp":"2024-02-08T12:35:38.458Z","pid":7003,"message":"* Max threads: 4"}
2024-02-08_12:35:38.45849 {"timestamp":"2024-02-08T12:35:38.458Z","pid":7003,"message":"* Environment: production"}
2024-02-08_12:35:38.45865 {"timestamp":"2024-02-08T12:35:38.458Z","pid":7003,"message":"* Master PID: 7003"}
2024-02-08_12:35:38.45877 {"timestamp":"2024-02-08T12:35:38.458Z","pid":7003,"message":"* Workers: 4"}
2024-02-08_12:35:38.45888 {"timestamp":"2024-02-08T12:35:38.458Z","pid":7003,"message":"* Restarts: (✔) hot (✖) phased"}
2024-02-08_12:35:38.45901 {"timestamp":"2024-02-08T12:35:38.458Z","pid":7003,"message":"* Preloading application"}
bundler: failed to load command: puma (/opt/gitlab/embedded/bin/puma)
/opt/gitlab/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 /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/connection_pool-2.4.1/lib/connection_pool.rb:72:in `_fork'
from /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/activesupport-7.0.8/lib/active_support/fork_tracker.rb:7:in `_fork'
from /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/puma-6.4.0/lib/puma/cluster.rb:99:in `fork'
from /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/puma-6.4.0/lib/puma/cluster.rb:99:in `spawn_worker'
Only started when I set 0 worker.