channel_ready_future blocks and doesn't honour the timeout specified

33 views
Skip to first unread message

Bijendra Singh

unread,
Nov 11, 2024, 11:41:30 AMNov 11
to grpc.io

Hi Team- My below grpc channel creation blocks  for infinite amount of time and doesn't raise any error. I am not sure why this is happening, this happens few of the times while calling this code. Can you please guide what can be the root cause here of channel_future getting blocked?

with grpc.insecure_channel(

            "localhost:"+str(PORT),

            options=[

                ('grpc.max_send_message_length', MAX_MESSAGE_LENGTH),

                ('grpc.max_receive_message_length', MAX_MESSAGE_LENGTH),

            ],

        ) as channel:

        channel_future = grpc.channel_ready_future(channel)

        channel_future.result(timeout=30)---> This is getting blocked and doesn’t honor the timeout 

Thanks


This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.

Sourabh Singh

unread,
Nov 18, 2024, 12:03:10 AMNov 18
to grpc.io
Hi Bijendra Singh,

Can you provide more details of your issue.
- Which OS you're on
- grpcio version
- share a sample client and server script to repro the issue

Thanks
Reply all
Reply to author
Forward
0 new messages