In that case, please file a github issue and include as much info as 
possible to reproduce.

thanks
Jan

On Monday, July 24, 2017 at 6:02:17 PM UTC+2, [email protected] wrote:
>
> I already had a logger in place and I was also seeing logs, there were 
> just no outgoing logs at the 5 minute mark or any time after that, even 
> though I still had a connection open.
>
> For now, I'm manually sending ping messages every 5 minutes on the channel 
> to keep it open, but this should not be necessary as e.g. in Go keep-alive 
> already works.
>
> On Monday, July 24, 2017 at 2:21:54 PM UTC+2, Jan Tattermusch wrote:
>>
>> Have you tried adding GrpcEnvironment.SetLogger(new ConsoleLogger());?
>>
>> Getting gRPC traces in C# is a bit more complicated that it ought to be (
>> https://github.com/grpc/grpc/issues/10574)
>>
>> On Sat, Jul 22, 2017 at 9:08 PM, <[email protected]> wrote:
>>
>>>
>>> I'm using the gRPC client in C# and using a long-lived duplex stream. 
>>> However, the TCP connection is closed at some time and therefore I would 
>>> like to use a keepalive in the client. The server (written in Go) is 
>>> already configured correctly for the keepalive and already tested with 
>>> clients written in Go.
>>>
>>> I use the following code to set a keepalive for 5 minutes and also to 
>>> enable tracing for viewing all incoming/outgoing bytes.
>>>
>>>     Environment.SetEnvironmentVariable("GRPC_TRACE", 
>>> "tcp,channel,http,secure_endpoint");
>>>     Environment.SetEnvironmentVariable("GRPC_VERBOSITY", "DEBUG");
>>>
>>>     var callCredentials = CallCredentials.FromInterceptor(Interceptor());
>>>
>>>     var roots = Encoding.UTF8.GetString(Resources.roots);
>>>
>>>     Channel = new Channel(address, ChannelCredentials.Create(new 
>>> SslCredentials(roots), callCredentials), new[]
>>>     {
>>>         new ChannelOption("grpc.keepalive_time_ms", 5 * 60 *  1000), // 
>>> 5 minutes
>>>     });
>>>
>>>     await Channel.ConnectAsync(DateTime.UtcNow.AddSeconds(5));
>>>
>>> However, in the log there are no bytes sent at 5 minutes and the 
>>> connection is closed as I can no longer send/receive messages via the same 
>>> stream after the stream has been idle for some time.
>>>
>>> How would I properly enable keepalive?
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "grpc.io" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at https://groups.google.com/group/grpc-io.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/grpc-io/3509b5e5-87d6-4bfd-a8d6-fc3a0446aa99%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/grpc-io/3509b5e5-87d6-4bfd-a8d6-fc3a0446aa99%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/0ff47271-c019-4544-bdf6-e7b2683ab11f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to