mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
tcp: Increase user timeout to 10 minutes (#17087)
This commit is contained in:
parent
6105997299
commit
31b5acc245
@ -67,8 +67,9 @@ func setTCPParameters(network, address string, c syscall.RawConn) error {
|
||||
// Set tcp user timeout in addition to the keep-alive - tcp-keepalive is not enough to close a socket
|
||||
// with dead end because tcp-keepalive is not fired when there is data in the socket buffer.
|
||||
// https://blog.cloudflare.com/when-tcp-sockets-refuse-to-die/
|
||||
// This is a sensitive configuration, it is better to set it to high values, > 60 secs
|
||||
_ = syscall.SetsockoptInt(fd, syscall.IPPROTO_TCP, unix.TCP_USER_TIMEOUT, (15+5*15)*1000)
|
||||
// This is a sensitive configuration, it is better to set it to high values, > 60 secs since it can
|
||||
// affect clients reading data with a very slow pace (disappropriate with socket buffer sizes)
|
||||
_ = syscall.SetsockoptInt(fd, syscall.IPPROTO_TCP, unix.TCP_USER_TIMEOUT, 10*60*1000)
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user