From 61a05553365c49b5f29e6306af87e2dc238401ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Moyne?= Date: Mon, 14 Aug 2023 10:58:20 -0700 Subject: [PATCH] Call SetBlockProfileRate even it the profiling port is not set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jean-Noël Moyne --- server/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/server.go b/server/server.go index c858974d..e1011bae 100644 --- a/server/server.go +++ b/server/server.go @@ -2093,6 +2093,9 @@ func (s *Server) Start() { // Pprof http endpoint for the profiler. if opts.ProfPort != 0 { s.StartProfiler() + } else { + // Enable blocking profile even if no port defined since profiling is always possible over $SYS requests + runtime.SetBlockProfileRate(1) } if opts.ConfigFile != _EMPTY_ {