Search code examples
http-headersgokeep-alivehttpconnection

http keep-alive timeout on server


Does the Go server have an http keep-alive default timeout value?

How do you set a custom keep-alive timeout?

Is the server's ReadTimeout related to the keep-alive timeout at all? or you need to set the keep-alive timeout directly in the http response header?


Solution

  • This issue shows they made the ReadTimeout server setting be per-request not per connection. This is the value you are looking to set to timeout keep-alives.