pkg/cri/streaming: increase ReadHeaderTimeout
It is follow-up of #7254. This commit will increase ReadHeaderTimeout from 3s to 30m, which prevent from unexpected timeout when the node is running with high-load. 30 Minutes is longer enough to get close to before what #7254 changes. And ideally, we should allow user to configure the streaming server if the users want this feature. Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
parent
f0e1a27cbd
commit
460b0533b2
@ -165,7 +165,8 @@ func NewServer(config Config, runtime Runtime) (Server, error) {
|
|||||||
Addr: s.config.Addr,
|
Addr: s.config.Addr,
|
||||||
Handler: s.handler,
|
Handler: s.handler,
|
||||||
TLSConfig: s.config.TLSConfig,
|
TLSConfig: s.config.TLSConfig,
|
||||||
ReadHeaderTimeout: 3 * time.Second, // Fix linter G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server
|
// TODO(fuweid): allow user to configure streaming server
|
||||||
|
ReadHeaderTimeout: 30 * time.Minute, // Fix linter G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server
|
||||||
}
|
}
|
||||||
|
|
||||||
return s, nil
|
return s, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user