From 45a71f134b7b7e0ce9066e0b67baf128b4f5858f Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Wed, 20 Dec 2023 16:18:23 +0800 Subject: [PATCH] conprof: use debug=1 for goroutine profile to avoid STW (#205) (#223) close pingcap/ng-monitoring#220 --- component/conprof/scrape/manager.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/component/conprof/scrape/manager.go b/component/conprof/scrape/manager.go index 6569e2e..e44065a 100644 --- a/component/conprof/scrape/manager.go +++ b/component/conprof/scrape/manager.go @@ -327,8 +327,9 @@ func goAppProfilingConfig(cfg config.ContinueProfilingConfig) *config.ProfilingC Path: "/debug/pprof/heap", }, "goroutine": &config.PprofProfilingConfig{ - Path: "/debug/pprof/goroutine", - Params: map[string]string{"debug": "2"}, + Path: "/debug/pprof/goroutine", + // debug=2 causes STW when collecting the stacks. See https://github.com/pingcap/tidb/issues/48695. + Params: map[string]string{"debug": "1"}, }, "mutex": &config.PprofProfilingConfig{ Path: "/debug/pprof/mutex",