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"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/BurntSushi/toml"
|
"github.com/BurntSushi/toml"
|
||||||
)
|
)
|
||||||
|
@ -73,6 +74,9 @@ func (cmd *Command) Run(args ...string) error {
|
||||||
// Set parallelism.
|
// Set parallelism.
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
||||||
|
// Turn on block profiling to debug stuck databases
|
||||||
|
runtime.SetBlockProfileRate(int(10 * time.Second))
|
||||||
|
|
||||||
// Parse config
|
// Parse config
|
||||||
config, err := cmd.ParseConfig(options.ConfigPath)
|
config, err := cmd.ParseConfig(options.ConfigPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue