Skip to content

Handling "Fetch to node %i failed: Cancelled: ..." error #1583

@xpyy

Description

@xpyy

Hello.

I have kafka with 3 brokers on different servers. I use kafka-python to read messages from one topic until i get timeout, like so:

def handle(self):
    consumer = KafkaConsumer(topic, **settings)
    while True:
        message = consumer.poll(timeout)
        if not message:
            break

        process_message(message)

    consumer.close()

I'm getting a lot of errors like "Fetch to node %i failed: Cancelled: ..." on 1 or 2 brokers. Debug log tells me that they actually have in flight requests with type "FetchRequest_v3".

My questions:

  1. Am i do something wrong?
  2. If not, how can i fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions