From 7cd7fb0c0a1282cc3329ff72158668b8d0fd905b Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Wed, 20 Nov 2024 22:35:36 +0300 Subject: [PATCH] disable logging for automaxprocs Signed-off-by: Vasiliy Tolstov --- service.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service.go b/service.go index 1276c9a3..cc827492 100644 --- a/service.go +++ b/service.go @@ -6,7 +6,7 @@ import ( "sync" "github.com/KimMachineGun/automemlimit/memlimit" - _ "go.uber.org/automaxprocs" + "go.uber.org/automaxprocs/maxprocs" "go.unistack.org/micro/v3/broker" "go.unistack.org/micro/v3/client" "go.unistack.org/micro/v3/config" @@ -20,6 +20,7 @@ import ( ) func init() { + maxprocs.Set() memlimit.SetGoMemLimitWithOpts( memlimit.WithRatio(0.9), memlimit.WithProvider(