-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
google-cloud-speech uncaught RejectedExecutionException in vendored OkHttp #4727
Comments
gRPC will eventually have a release that will fix this problem. We'll upgrade to that version, once it's out. |
Hi, Is this fix available? |
We are at grpc 1.19.0, and the latest is 1.20.0. However, it lookes like upgrading won't help, since grpc/grpc-java#5248 has not been merged yet. |
I tried to downgrade it back to 1.17.1 as well as the lib to a previous version (0.80.0) but no luck. My workaround was to apply an Executor directly to the client. SpeechClient.create(SpeechSettings.newBuilder()
.setExecutorProvider(FixedExecutorProvider.create(Executors.newScheduledThreadPool(
Math.max(2, Math.min(Runtime.getRuntime().availableProcessors() - 1, 4))
))); Too much boilerplate. But now I'm facing some inconsistencies with Getting But well, it seems to be a hard job porting this to java from GRPC. |
There doesn't seem to be much we can do in this repository. We'll upgrade grpc once it makes a new release with the fix. |
This is unrelated to okhttp. You should not shut down executors provided to grpc before the grpc channel before it becomes terminated. If you do, bad things will happen. grpc/grpc-java#636 discusses some of how grpc may handle that better. If you only shut down executors after the channels are terminated, then it could be due to a race where the channel reports terminated prematurely: grpc/grpc-java#6283 . The other possibility is you shut down executors while still performing RPCs: grpc/grpc-java#1981 Only one of those is a clear bug in gRPC. The others are "make the best of the bad situation." With this backtrace, it appears the executor is being shut down before the transport is terminated. That's most likely a bug outside of grpc. |
Intermittently, a
StreamingRecognizeRequest
will throw an uncaught exception:This appears to be a bug that is fixed in OkHttp 3.12: square/okhttp#4365
and there is a PR to upgrade the vendored framework: grpc/grpc-java#5248
The text was updated successfully, but these errors were encountered: