From 66e06dc2a95e0ea853d565e4bbe0e0706eb0cf70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= <kevin@dunglas.fr> Date: Sun, 26 Jan 2025 22:06:00 +0100 Subject: [PATCH] comments --- cmd/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/main.go b/cmd/main.go index 2fc78cbb0..01bdb9881 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -69,12 +69,16 @@ func Main() { os.Exit(caddy.ExitCodeFailedStartup) } + // Configure the maximum number of CPUs to use to match the Linux container quota (if any) + // See https://pkg.go.dev/runtime#GOMAXPROCS undo, err := maxprocs.Set() defer undo() if err != nil { caddy.Log().Warn("failed to set GOMAXPROCS", zap.Error(err)) } + // Configure the maximum memory to use to match the Linux container quota (if any) or system memory + // See https://pkg.go.dev/runtime/debug#SetMemoryLimit _, _ = memlimit.SetGoMemLimitWithOpts( memlimit.WithLogger( slog.New(zapslog.NewHandler(caddy.Log().Core())),