Adding read nad write timeout for unresponsive client connectinos (#1809)

master
karthic rao 8 years ago committed by Harshavardhana
parent 2e4ab71303
commit 1947ae198e
  1. 6
      server-main.go

@ -26,6 +26,7 @@ import (
"strconv"
"strings"
"syscall"
"time"
"github.com/minio/cli"
"github.com/minio/mc/pkg/console"
@ -79,7 +80,10 @@ type serverCmdConfig struct {
func configureServer(srvCmdConfig serverCmdConfig) *http.Server {
// Minio server config
apiServer := &http.Server{
Addr: srvCmdConfig.serverAddr,
Addr: srvCmdConfig.serverAddr,
// Adding timeout of 10 minutes for unresponsive client connections.
ReadTimeout: 600 * time.Second,
WriteTimeout: 600 * time.Second,
Handler: configureServerHandler(srvCmdConfig),
MaxHeaderBytes: 1 << 20,
}

Loading…
Cancel
Save