Skip to content

Remove legacy memory killer

The motivation

Followup https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/10930#note_386967266. We should consider removing the Sidekiq legacy memory killer to simplify the configuration management.

We have two Sidekiq memory killers: legacy memory killer(lib/gitlab/sidekiq_middleware/memory_killer.rb) and daemon memroy killer(lib/gitlab/sidekiq_daemon/memory_killer.rb).

The default one is still the legacy memory killer. From Configuring the MemoryKiller

SIDEKIQ_DAEMON_MEMORY_KILLER: defaults to 0. When set to 1, the MemoryKiller works in daemon mode. Otherwise, the MemoryKiller works in legacy mode.

We prefer to use the Daemon memory killer to replace the legacy one. The daemon memory killer has some advantages: !41847 (comment 412020465)

Before GitLab 13.4, the daemon memory killer was NOT used in production

To be safe, we take three steps

Edited by Qingyu Zhao