THRIFT-5240: Tweak the default go server connectivity check interval
Client: go
This is a follow up to 4db7a0af13ac9614e3e9758d42b2791040f4dc7e.
Because of the Go runtime bug [1], the previous default value of 1ms is
not a great default as it could cause excessive cpu usage. Use 5ms
instead as a balance between being useful and not causing too much cpu
overhead.
It's still configurable.
[1]: https://github.com/golang/go/issues/27707
diff --git a/lib/go/README.md b/lib/go/README.md
index 5b7e2cd..74e142b 100644
--- a/lib/go/README.md
+++ b/lib/go/README.md
@@ -107,4 +107,9 @@
thrift.ServerConnectivityCheckInterval = 0
+Please be advised that due to a
+[Go runtime bug](https://github.com/golang/go/issues/27707), currently
+if this interval is set to a value too low (for example, 1ms), it might cause
+excessive cpu overhead.
+
This feature is also only enabled on non-oneway endpoints.
diff --git a/lib/go/thrift/simple_server.go b/lib/go/thrift/simple_server.go
index 68ac394..e9fea86 100644
--- a/lib/go/thrift/simple_server.go
+++ b/lib/go/thrift/simple_server.go
@@ -46,7 +46,7 @@
// implementations can change its value to control the behavior.
//
// If it's changed to <=0, the feature will be disabled.
-var ServerConnectivityCheckInterval = time.Millisecond
+var ServerConnectivityCheckInterval = time.Millisecond * 5
/*
* This is not a typical TSimpleServer as it is not blocked after accept a socket.