google-cloud-java: PubSub runs into `java.lang.RuntimeException: ManagedChannel allocation site` when a new publisher is created
Hi!
We’ve currently received around 100-200 PubSub related issues when a PubSub publisher is created with the following stacktrace:
io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference cleanQueue: *~*~*~ Channel ManagedChannelImpl{logId=4613, target=pubsub.googleapis.com:443} was not shutdown properly!!! ~*~*~* (ManagedChannelOrphanWrapper.java:163)
Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
java.lang.RuntimeException: ManagedChannel allocation site
at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.<init>(ManagedChannelOrphanWrapper.java:103)
at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:53)
at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:44)
at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:410)
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:206)
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:162)
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:149)
at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:151)
at com.google.cloud.pubsub.v1.stub.GrpcPublisherStub.create(GrpcPublisherStub.java:161)
at com.google.cloud.pubsub.v1.Publisher.<init>(Publisher.java:154)
at com.google.cloud.pubsub.v1.Publisher.<init>(Publisher.java:83)
at com.google.cloud.pubsub.v1.Publisher$Builder.build(Publisher.java:607)
We are using PubSub library v 1.40.0
. And here is how we create publishers:
Publisher createPublisher(ProjectTopicName topicName) {
try {
Publisher publisher = Publisher.newBuilder(topicName)
.build();
return publisher;
} catch (IOException e) {
String errorMessage = format("Cannot create a publisher for topic %s", topicName);
throw new IllegalStateException(errorMessage, e);
}
}
Any thoughts or suggestions? By the way, we are running on AppEngine Standard with Java 8.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 18 (3 by maintainers)
Commits related to this issue
- pubsub: add Publisher.awaitTermination (#3688) [Newer gRPC versions](https://github.com/grpc/grpc-java/releases/tag/v1.12.0) seem to check that we call this method. Currently shutdown waits for all ... — committed to googleapis/google-cloud-java by pongad 6 years ago
- Sync to master head (#3698) * bigquery: let users contruct TableResult for testing (#3242) Fixes #3228. * remove dead assignment (#3247) * bigquery: unbox Boolean in examples (#3248) * Mo... — committed to googleapis/google-cloud-java by snehashah16 6 years ago
Yeah, we do still experience problems.
We are also using
1.48.0
now.Same here. The error still persists. I’m using version 1.45.0. @pongad @snehashah16 , could you please reopen this issue?