New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queue Full on producer #2247
Comments
|
queue.buffering.max.ms and linger.ms are the same thing (the latter aliases the former). In your case I'd suggest starting at 10ms and going upwards in increments of 10 until you find the sweet spot between latency and throughput. Also, when you hit ERR__QUEUE_FULL you should call poll(some timeout) and then retry sending. |
|
Thanks for the response. With suggested changes , I am able to delay the Queue Full error however it hits somehow. Regarding introducing delay, this is not desirable solution as I am planning to use kakfa to consume real-time market data which very high frequency data. so even a wait for few milli second is not an ideal solution. Also note that program hits Queue full error around 850K messages from the total of 1.4 mm messages I am sending. Below is the settings I am using as per you suggestion before. ( ERROR : |
|
I suggest you enable statistics by setting a stats_cb and setting statistics.interval.ms to e.g., 1000 ms. |
|
Why are you setting batch.num.messages=10, btw? You want as large batches as possible, leave it at the default value. You also never want to use request.required.acks=0, you might as well just throw away your messages since you will have no indication if they were delivered or not. |
|
I was playing around batch size and acks to see if that helps to eliminate the error. I have taken a snapshot for 10 seconds before producer got stuck with Queue Full error. ( I don't see anything problematic. https://gist.github.com/pratikbatua/af9885e1d832129bcfc0f3ff1b467d60 |
|
You're still using acks=0 (fire and forget), highly recommend all or 1. |
|
I was using it to ensure that there is no backlog of messages on producer for which ack is pending. I ran the test with below props. I can see that the after ~40 seconds the producer queue message size reaches max capacity. I really don't have an option to wait in between on producer side as can't delay the market data flow . what would be your suggestion ? (
|
|
How many partitions does the topic(s) have that you are producing to? |
|
I am using single broker and 5 partitions |
|
Check the CPU and IO load on the broker, as well as network utilization, maybe the broker and or network cant keep up |
|
Hi, I am using 10G network on producer/consumer/broker. Is there any limitation with broker on how much messages they can handle? The time when the error gets generated got delayed now. I need the capacity of 150K+ messages per second. |
|
Exactly the issue I faced. To be frank I was complaining the client library. Actually it was the broker. See for the network throughput, if you using kubernetes in cloud, check for the IOPS for the network storage. In my case, the culprit was n/w bandwidth. I was using 1Gbps. My bad. !!! |
Read the FAQ first: https://github.com/edenhill/librdkafka/wiki/FAQ
Description
I have tried multiple settings mentioned in other issues however the problem still persist. Producer rate is ~100K messages per second. Below are the config settings I am using -
(
metadata.broker.list;localhost:9092);(
statistics.interval.ms;10000);(
queue.buffering.max.ms;0);(
queue.buffering.max.messages;10000000);(
queue.buffering.max.kbytes;2097151);(
linger.ms;5);(
batch.num.messages;1);(
fetch.wait.max.ms;0);(
request.required.acks;0)Increasing the buffersize only delay the problem.
How to reproduce
I have 3G size file which I read and use to generate the message and continuously publish each message. The message volume is~1.4 million. The producer breaks neat 700K after applying above settings.
IMPORTANT: Always try to reproduce the issue on the latest released version (see https://github.com/edenhill/librdkafka/releases), if it can't be reproduced on the latest version the issue has been fixed.
Checklist
IMPORTANT: We will close issues where the checklist has not been completed.
Please provide the following information:
librdkafka version (release number or git tag): 0.11
Apache Kafka version: 2.11-2.1.0
librdkafka client configuration:
(
metadata.broker.list;localhost:9092);(
statistics.interval.ms;10000);(
queue.buffering.max.ms;0);(
queue.buffering.max.messages;10000000);(
queue.buffering.max.kbytes;2097151);(
linger.ms;5);(
batch.num.messages;1);(
fetch.wait.max.ms;0);(
request.required.acks;0)Operating system: x86_64 GNU/Linux RHEL 7
Provide logs (with
debug=..as necessary) from librdkafkaQueue Full
Provide broker log excerpts
Critical issue
The text was updated successfully, but these errors were encountered: