Sergey Kandaurov
January 22, 2019 07:02AM
> On 22 Jan 2019, at 06:43, Roar <nginx-forum@forum.nginx.org> wrote:
>
> Grpc server is sitting at my backends, I use nginx as the proxy to transfer
> http1.1 to http2(grpc) protocol, I set parameter like below:
>
> upstream ID_PUMPER {
> server 127.0.0.1:58548;
> }
>
> server {
> listen 8080 http2;
> grpc_read_timeout 120s;
> grpc_send_timeout 120s;
> grpc_socket_keepalive on;
> keepalive_timeout 100s;
>
> location /utoProto.idProduce.IdProduce {
> grpc_pass grpc://ID_PUMPER;
> }
> }
>
> It will establish connection between nginx and grpc server, but it can not
> hold the connection and the collection will be closed after one minute even
> though I set keepalive_timeout parameter

To tune keepalive timeout to upstream connections,
you need the keepalive_timeout directive of the upstream module,
that is, specified in the upstream{} block. See for details:
http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_timeout

--
Sergey Kandaurov

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

grpc keepalive does not effect, nginx will close connection by the minute

Roar January 21, 2019 10:43PM

Re: grpc keepalive does not effect, nginx will close connection by the minute

Sergey Kandaurov January 22, 2019 07:02AM

Re: grpc keepalive does not effect, nginx will close connection by the minute

Roar January 22, 2019 09:37PM

Re: grpc keepalive does not effect, nginx will close connection by the minute

Sergey Kandaurov January 23, 2019 05:58AM

Re: grpc keepalive does not effect, nginx will close connection by the minute

Roar January 23, 2019 10:05PM

Re: grpc keepalive does not effect, nginx will close connection by the minute

Sergey Kandaurov January 24, 2019 10:42AM

Re: grpc keepalive does not effect, nginx will close connection by the minute

Roar January 25, 2019 12:43AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 255
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready