confluent-kafka-python
confluent-kafka-python copied to clipboard
it's bound to keep throwing BufferError after a few hours(unpredictable) of running
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:
- [x] confluent-kafka-python version : ('2.2.0', 33685504) and librdkafka version: ('2.2.0', 33685759) python version: 3.11.2
- [x] Apache Kafka broker version: kafka_2.13-2.6.0
- [x] Client configuration:
default - [x] Operating system:
docker Centos 8 - [ ] Provide client logs (with
'debug': '..'as necessary) - [ ] Provide broker log excerpts
- [x] Critical issue
Can you please enable debug logs and reproduce the issue?
@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