Welcome! Log In Create A New Profile

Advanced

Re: grpc-go client disconnect in 60 seconds

Maxim Dounin
November 10, 2020 08:42AM
Hello!

On Tue, Nov 10, 2020 at 07:56:36AM -0500, aagrawal wrote:

> Hi ,
> I am using grpc-go client for grpc subscription, and in every 60 seconds
> after subscription , it is disconnecting.
> I run nginx in debug mode, and found following logs where i see that "408"
> error happened , because "client_body_timeout is default value 60 seconds."

[...]

> I tried increasing this client_body_timeout directive to 360 seconds, i see
> that grpc-go client disconnect in 360 seconds.
> Same issue was not observed when i run grpc-java client or grpc-python
> client .
>
> Can you please help me to know why this issue may happen ?

As long as your gRPC call uses client-to-server streaming, from
HTTP point of view it essentially sends the request body in a
small chunks. As long as no data are sent for a long time, the
client body timeout will occur. This is what you seems to
observe in your tests.

Similarly, grpc_read_timeout might occur for server-to-client
streaming if no data are sent for a long time.

To fix this, make sure that at least some data are sent in gRPC
streams periodically, and configure timeouts to something larger
than the period in question. Alternatively, consider avoiding
gRPC streams and/or make sure streams are properly closed when
they are no longer needed.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

grpc-go client disconnect in 60 seconds

aagrawal November 10, 2020 07:56AM

Re: grpc-go client disconnect in 60 seconds

Maxim Dounin November 10, 2020 08:42AM

Re: grpc-go client disconnect in 60 seconds

aagrawal November 10, 2020 08:59AM

Re: grpc-go client disconnect in 60 seconds

Maxim Dounin November 10, 2020 09:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 312
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