question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PubSub runs into `java.lang.RuntimeException: ManagedChannel allocation site` when a new publisher is created

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
yuri-sergiichukcommented, Oct 12, 2018

Yeah, we do still experience problems.

We are also using 1.48.0 now.

1reaction
borissndcommented, Oct 12, 2018

Same here. The error still persists. I’m using version 1.45.0. @pongad @snehashah16 , could you please reopen this issue?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found