Fix DISABLE_PUMA_WORKER_KILLER switch
This came out of an investigation into why we weren't seeing any memory killer events in SaaS. I described the issue here: #334831 (comment 966134364)
The Puma worker killer is a gem we use to reap Puma workers in case the process cluster runs above a given memory budget. It is meant to be enabled by default, but you can disable it via the DISABLE_PUMA_WORKER_KILLER
environment variable.
Copying over the bug description:
In puma.rb, we check ENV['DISABLE_PUMA_WORKER_KILLER']
for truthiness -- that is not correct since environment variables are always strings and any string, even when empty, is truthy in Ruby:
irb(main):004:0> "" || "not set"
=> ""
This is not a problem as long as we don't set this environment at all (i.e. the expression evaluates to nil
, which is falsey) or set it to something truthy (1
, true
, foo
), but as soon as we set it to something that is (supposed to be) falsey (0
, false
), then the unless
condition will still evaluate to true, which is what triggers this bug.
Turns out we explicitly set this to false
in our GitLab chart: https://gitlab.com/gitlab-com/gl-infra/k8s-workloads/gitlab-com/blob/3322ba5ff67d3ff4996222610cd8966e66a5ab35/charts/gitlab/gprd/charts/gitlab/charts/webservice/values.yaml#L112
Therefore the worker killer is neither running for users of our chart by default, nor for SaaS.
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.
Changes
-
CNG: gitlab-org/build/CNG!1042 (merged) -
Omnibus: omnibus-gitlab!6173 (merged) -
gitlab-rails: !88928 (merged)