Skip to content

Enable watchdog by default for Puma

Nikola Milojevic requested to merge add-watchdog-as-default-for-puma into master

What does this MR do and why?

In #379198 (closed) we introduced the RssMemoryLimit monitor for watchdog which is backward compatible with puma worker killer. In case our customers are using Puma Worker killer, we will move them to Watchdog, but they will use RssMemoryLimit, which uses puma[per_worker_max_memory_mb] if configured.

In order to move customers to watchdog we need to enable GITLAB_MEMORY_WATCHDOG_ENABLED by default for Puma. We also want to add a check if the Watchdog is enabled in both PumaWorkerKillerInitializer and memory_watchdog initializer.

In case the Watchdog is enabled, we don't initialize PWK. In case customers are not using PWK, we use Watchdog with default puma monitors: HeapFragmentation and UniqueMemoryGrowth, same as for SaaS.

This MR enables Watchdog by default for Puma and adds a check for PWK initializer in case Watchdog is enabled, so we don't initialize Puma Worker killer.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to: #381697 (closed)

Edited by Nikola Milojevic

Merge request reports