PubSub runs into `java.lang.RuntimeException: ManagedChannel allocation site` when a new publisher is created
See original GitHub issueHi!
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.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:17 (3 by maintainers)
Top Results From Across the Web
PubSub runs into `java.lang.RuntimeException - Bountysource
PubSub runs into `java.lang.RuntimeException: ManagedChannel allocation site` when a new publisher is created.
Read more >Curious exceptions in log - Google Groups
when trying to create a new publisher. Curiously they don't seem to always ... st=java.lang.RuntimeException: ManagedChannel allocation site.
Read more >Periodically I can't create GCP task because of java.lang ...
RuntimeException : ManagedChannel allocation site - Stack Overflow ...
Read more >Re: PubSub source throwing grpc errors - The Mail Archive
Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true. java.lang.RuntimeException: ManagedChannel allocation site at ...
Read more >Publish and receive messages in Pub/Sub by using a client ...
This page shows you how to get started publishing messages with Pub/Sub using ... If you're new to Google Cloud, create an account...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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?