Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelogs/unreleased/po-server-keep-alive.yml5
-rw-r--r--client/dial.go5
2 files changed, 10 insertions, 0 deletions
diff --git a/changelogs/unreleased/po-server-keep-alive.yml b/changelogs/unreleased/po-server-keep-alive.yml
new file mode 100644
index 000000000..d763e0120
--- /dev/null
+++ b/changelogs/unreleased/po-server-keep-alive.yml
@@ -0,0 +1,5 @@
+---
+title: Lower gRPC server inactivity ping timeout
+merge_request: 1294
+author:
+type: added
diff --git a/client/dial.go b/client/dial.go
index 190cb7ca9..13518882e 100644
--- a/client/dial.go
+++ b/client/dial.go
@@ -6,6 +6,7 @@ import (
"time"
"google.golang.org/grpc/credentials"
+ "google.golang.org/grpc/keepalive"
"net/url"
@@ -70,6 +71,10 @@ func Dial(rawAddress string, connOpts []grpc.DialOption) (*grpc.ClientConn, erro
return net.DialTimeout("unix", path, timeout)
}),
+ grpc.WithKeepaliveParams(keepalive.ClientParameters{
+ Time: 20 * time.Second,
+ PermitWithoutStream: true,
+ }),
)
}