confluentinc / confluent-kafka-python

Confluent's Kafka Python Client
http://docs.confluent.io/current/clients/confluent-kafka-python
Other
3.73k stars 882 forks source link

it's bound to keep throwing BufferError after a few hours(unpredictable) of running #1673

Open Newester opened 7 months ago

Newester commented 7 months ago

Description

After a few hours(unpredictable) of running the program, it's bound to keep throwing BufferError, cannot recover itself unless we restart the app. QPS of msgs send is about 400 ~ 600. fake code:

producer = Producer({...})
for msg in  msg_list:
    cnt = 0
    while cnt < 3:  
        try:
            producer.produce(topic, value=msg)
        except BufferError:
           # logging
            producer.poll(0.5)
            cnt++
            continue
        except:
            # logging
            break
        else:
            break

How to reproduce

After a few hours(unpredictable) of running the program, it's bound to keep throwing BufferError.

Checklist

Please provide the following information:

pranavrth commented 7 months ago

Can you please enable debug logs and reproduce the issue?

nhaq-confluent commented 4 months ago

@Newester wanted to ping you on the above as it would help us move forward with your issue.

If this issue is no longer relevant, please let us know so we can close it