Skip to content

Commit 02ee29d

Browse files
committed
increase default healthCheckTimeout to 120s
1 parent b2a891f commit 02ee29d

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ models:
6363
<summary>But also very powerful ...</summary>
6464
6565
```yaml
66-
# Seconds to wait for llama.cpp to load and be ready to serve requests
67-
# Default (and minimum) is 15 seconds
68-
healthCheckTimeout: 60
66+
# Seconds to wait for upstream to load and be ready to serve requests
67+
# minimum is 15 seconds
68+
# default is 120 seconds
69+
healthCheckTimeout: 500
6970

7071
# Valid log levels: debug, info (default), warn, error
7172
logLevel: info

proxy/config.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,12 @@ func LoadConfigFromReader(r io.Reader) (Config, error) {
113113
return Config{}, err
114114
}
115115

116-
if config.HealthCheckTimeout < 15 {
116+
if config.HealthCheckTimeout == 0 {
117+
// this high default timeout helps avoid failing health checks
118+
// for configurations that wait for docker or have slower startup
119+
config.HealthCheckTimeout = 120
120+
} else if config.HealthCheckTimeout < 15 {
121+
// set a minimum of 15 seconds
117122
config.HealthCheckTimeout = 15
118123
}
119124

proxy/process.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func NewProcess(ID string, healthCheckTimeout int, config ModelConfig, processLo
100100
concurrencyLimitSemaphore: make(chan struct{}, concurrentLimit),
101101

102102
// stop timeout
103-
gracefulStopTimeout: 5 * time.Second,
103+
gracefulStopTimeout: 10 * time.Second,
104104
upstreamWasStoppedWithKill: false,
105105
}
106106
}

0 commit comments

Comments
 (0)