Is there a way to set timeout on the server (the server is in java) ? Is there a way to set a default timeout for ALL calls on the client? I definitely would not want to do it before every single call (unless it actually overrides the default).
Also, getting back to (1), why doesn't uncaught exception cause the RPC to abort immediately? Instead, both the client and the server simply get stuck. thanks, Eugene On Thursday, December 15, 2016 at 10:38:24 AM UTC-8, Nathaniel Manista wrote: > > On Wed, Dec 14, 2016 at 6:01 PM, Eugene Strulyov <[email protected] > <javascript:>> wrote: > >> I'm not setting explicit timeout on the client. It would be too >> error-prone to set it on every call. >> > > Please reconsider this - after years working on different Google > production systems I came to the gRPC project with the attitude that making > an RPC without a timeout (or deadline) is asking for trouble and initially > designed gRPC Python with mandatory timeouts. I only made them > non-mandatory in the final API to match the APIs of the other gRPC > languages, not because something has changed my mind and I now think making > an RPC without a timeout is a responsible way to code a distributed system. > > Is there a way to set default timeout on either the client or the server? >> > > There might be in other languages, but not in Python - we tried it in our > Alpha API and it didn't bring the user benefit we wanted from it so it is > no longer present. > > On Wednesday, December 14, 2016 at 5:11:37 PM UTC-8, Nathaniel Manista >> wrote: >> >>> On Wed, Dec 14, 2016 at 5:08 PM, Eugene Strulyov <[email protected]> >>> wrote: >>> >>>> 2. I would expect the call to time out at some point. >>>> >>> > If you don't pass a (client side) timeout value then you should not have > any (client side) expectation that the RPC will time out. > > It would be really *really* undesirable to leave both the client and the >>>> server in a zombie state. >>>> >>> > Agreed - but without having passed a timeout value on the client side, if > your server side code has a bug in which it hangs the RPC forever then your > client side code will hang forever waiting for the conclusion of the hung > RPC. > > The timeout does not seem to be happening. >>>> >>> > This is expected for RPCs invoked without a timeout. > -N > -- 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/1bac2025-472b-4728-83d0-39c1b7b9c1eb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
