mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/httpserver: mention that -http.maxGracefulShutdownDuration
command-line flag value can be increased on shutdown timeout
This commit is contained in:
parent
fbfa6aa9f0
commit
d99f48aa48
1 changed files with 2 additions and 1 deletions
|
@ -108,7 +108,8 @@ func Stop(addr string) error {
|
||||||
ctx, cancelFunc := context.WithTimeout(context.Background(), *maxGracefulShutdownDuration)
|
ctx, cancelFunc := context.WithTimeout(context.Background(), *maxGracefulShutdownDuration)
|
||||||
defer cancelFunc()
|
defer cancelFunc()
|
||||||
if err := s.Shutdown(ctx); err != nil {
|
if err := s.Shutdown(ctx); err != nil {
|
||||||
return fmt.Errorf("cannot gracefully shutdown http server at %q in %.3fs: %s", addr, maxGracefulShutdownDuration.Seconds(), err)
|
return fmt.Errorf("cannot gracefully shutdown http server at %q in %.3fs; "+
|
||||||
|
"probably, `-http.maxGracefulShutdownDuration` command-line flag value must be increased; error: %s", addr, maxGracefulShutdownDuration.Seconds(), err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue