Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
pkg/conf: add DISABLE_CONF_DEADLOCK_DETECTOR=true for debugging
Browse files Browse the repository at this point in the history
This allows you to disable the pkg/conf deadlock detector in dev mode which
triggers anytime the frontend does not start after a reasonable amount of time.

Primarily this is useful for debugging e.g. DB migrations that take far too long,
or other causes of the frontend not starting in a timely manner in dev mode.

Fixes #4380
  • Loading branch information
slimsag committed Jun 6, 2019
1 parent b051019 commit eb6b5fb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/conf/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package conf

import (
"fmt"
"os"
"runtime/debug"
"strconv"
"sync"
"time"

Expand Down Expand Up @@ -126,6 +128,10 @@ func (s *Store) WaitUntilInitialized() {
deadlockTimeout := 5 * time.Minute
if IsDev(DeployType()) {
deadlockTimeout = 30 * time.Second
disable, _ := strconv.ParseBool(os.Getenv("DISABLE_CONF_DEADLOCK_DETECTOR"))
if disable {
deadlockTimeout = 24 * 365 * time.Hour
}
}

select {
Expand Down

0 comments on commit eb6b5fb

Please sign in to comment.