turn on block profiling
This should help us figure out where exactly a database is hung when it happens.pull/3652/head
parent
c81a0afb8f
commit
765eee74b1
|
@ -11,6 +11,7 @@ import (
|
|||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
)
|
||||
|
@ -73,6 +74,9 @@ func (cmd *Command) Run(args ...string) error {
|
|||
// Set parallelism.
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
||||
// Turn on block profiling to debug stuck databases
|
||||
runtime.SetBlockProfileRate(int(10 * time.Second))
|
||||
|
||||
// Parse config
|
||||
config, err := cmd.ParseConfig(options.ConfigPath)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue