I opened this issue, https://github.com/grpc/grpc-java/issues/5286 which is the underlying problem in my opinion.
On Thursday, January 24, 2019 at 11:14:01 AM UTC-8, [email protected] wrote: > > I am trying to prototype a java client cache interceptor in AppEngine > (java8) and gRPC(1.17.1). The cache interceptor needs to write to AppEngine > memcache, so it requires thread be created via ThreadManager > <https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/ThreadManager#currentRequestThreadFactory-->. > > When I try to supply a custom executor to gRPC via NettyChannelBuilder > <https://github.com/grpc/grpc-java/blob/master/core/src/main/java/io/grpc/internal/AbstractManagedChannelImplBuilder.java#L210> > > or withExecutor > <https://grpc.io/grpc-java/javadoc/index.html?io/grpc/ManagedChannelBuilder.html>, > > the call is lost and future get hangs. Note that, all the grpc calls have a > deadline of 10 seconds, but I don't see the timeout happening. Seems like > gRPC is running into an internal error. AppEngine eventually kills the > request with Deadline Exceeded error and no logs are available in the > appengine console. > > I went through the issue, https://github.com/grpc/grpc-java/issues/3296 > and from the fix described here, > https://github.com/grpc/grpc-java/pull/3382 supplying the executor should > make this possible. But given the sandboxed nature of AppEngine, I don't > know what is going wrong. > > 1. In which thread interceptors execute ? Does it use the executor > specified in the FutureStub or the event loop ? > 2. Besides the executor, what other internal threads gRPC use ? Can I > control them to run on the application specified threads ? > 3. When thread issues happen, why does the gRPC call hangs, instead of > timing out/failing with an error. > > Thanks, > Arun. > -- 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/4ee9dd9e-ac77-4750-8604-9e474137ca5a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
