Skip to content

puma memory configuration: per_worker_max_memory_mb or puma_ per_worker_max_memory_mb? #3154

Description

@xueshanf

This repository puma.rb template uses 'puma_per_worker_max_memory_mb', however, all other gitlab documents use "per_worker_max_memory_mb" in puma.rb file. For example in puma

I have tried to allocate 2048 Mb memory using PUMA_PER_WORK_MAX_MEMORY_MB, but it doesn't seem to take effect:

{"severity":"WARN","time":"2025-08-16T23:27:00.441Z","memwd_max_strikes":5,"memwd_cur_strikes":6,"message":"rss memory limit exceeded","memwd_rss_bytes":1576566784,"memwd_max_rss_bytes":1572864000,"memwd_handler_class":"Gitlab::Memory::Watchdog::Handlers::PumaHandler","memwd_sleep_time_s":60,"pid":2555,"worker_id":"puma_3"}

This is the puma.rb file generated:

before_fork do
  # Signal to the puma killer
  Gitlab::Cluster::PumaWorkerKillerInitializer.start(@config.options, puma_per_worker_max_memory_mb: 2048, puma_master_max_memory_mb: 800) unless ENV['DISABLE_PUMA_WORKER_KILLER']

  # Signal application hooks that we're about to fork
  Gitlab::Cluster::LifecycleEvents.do_before_fork
end

Should the puma.rb configuration template uses per_worker_max_memory_mb, instead of max_per_worker_max_memory_mb?

Xueshan

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions