diff --git a/internal/cli/debug_pprof.go b/internal/cli/debug_pprof.go index a979741fda..ca14604b97 100644 --- a/internal/cli/debug_pprof.go +++ b/internal/cli/debug_pprof.go @@ -129,8 +129,9 @@ func (d *DebugPprofCommand) Run(args []string) int { // Only take cpu and heap profiles by default profiles := map[string]string{ - "heap": "heap", - "cpu": "cpu", + "heap": "heap", + "cpu": "cpu", + "mutex": "mutex", } if !d.skiptrace { diff --git a/internal/cli/server/server.go b/internal/cli/server/server.go index f0cea4de06..44b291af40 100644 --- a/internal/cli/server/server.go +++ b/internal/cli/server/server.go @@ -8,6 +8,7 @@ import ( "net" "net/http" "os" + "runtime" "strings" "time" @@ -70,6 +71,8 @@ func WithGRPCListener(lis net.Listener) serverOption { //nolint:gocognit func NewServer(config *Config, opts ...serverOption) (*Server, error) { + runtime.SetMutexProfileFraction(5) + srv := &Server{ config: config, }