forked from wrenn/wrenn
fix: prevent sandbox halt after resume by fixing HTTP/2 HOL blocking and adding timeouts
Disable HTTP/2 on both host agent server and CP→agent transport — multiplexing caused head-of-line blocking when a slow sandbox RPC stalled the shared connection. Add ResponseHeaderTimeout to envd HTTP clients. Merge SetDefaults into Resume's PostInit call to eliminate an extra round-trip that could hang on a stale connection.
This commit is contained in:
@ -154,6 +154,11 @@ func main() {
|
||||
Addr: listenAddr,
|
||||
ReadHeaderTimeout: 10 * time.Second,
|
||||
IdleTimeout: 620 * time.Second, // > typical LB upstream timeout (600s)
|
||||
// Disable HTTP/2: empty non-nil map prevents Go from registering
|
||||
// the h2 ALPN token. Connect RPC works over HTTP/1.1; HTTP/2
|
||||
// multiplexing causes HOL blocking when a slow sandbox RPC stalls
|
||||
// the shared connection.
|
||||
TLSNextProto: make(map[string]func(*http.Server, *tls.Conn, http.Handler)),
|
||||
}
|
||||
|
||||
// mTLS is mandatory — refuse to start without a valid certificate.
|
||||
|
||||
Reference in New Issue
Block a user