From a319f187dd3afc485bbb5288ebb729ab82440108 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 19 Dec 2025 12:48:15 +0000 Subject: [PATCH] cgroups only on linux --- backend/src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/main.rs b/backend/src/main.rs index c51d5f9da1..c4869c907a 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -71,6 +71,7 @@ use windmill_common::worker::CLOUD_HOSTED; #[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))] use monitor::monitor_mem; +#[cfg(any(target_os = "linux"))] use crate::cgroups::disable_oom_group; #[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))] @@ -511,10 +512,12 @@ async fn windmill_main() -> anyhow::Result<()> { let worker_mode = num_workers > 0; if worker_mode { + #[cfg(any(target_os = "linux"))] if let Err(e) = disable_oom_group() { tracing::warn!("failed to disable oom group: {:?}", e); } } + let conn = if mode == Mode::Agent { conn } else {