-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Receive failed: Invalid response size 100000039 (0..100000000): increase receive.message.max.bytes #1616
Comments
When you increased receive.message.max.bytes to 2M, did you also increase fetch.message.max.bytes? |
yeah,i increased receive.message.max.bytes and fetch.message.max.bytes to 200M. |
I encountered the same error again lately during the load test, I reported the same issue last Oct. This time, we log if message size is bigger than 1MB on the Golang-Producer side. Producer claimed never send anything bigger than 1MB per log, so the messages traveled from different DC to our Core DC-Kafka-Cluster by MirrorMaker, and our Golang-Consumer-Client threw this error. %3|1518222481.951|ERROR|rdkafka#consumer-7| [thrd:ps6576.prn.XXX.com:9092/1]: ps6576.prn.XXX.com:9092/1: Receive failed: Invalid response size 1000000206 (0..1000000000): increase receive.message.max.bytes |
@sheeysong |
Hi @edenhill , |
Hi @edenhill |
I'm having the same issue and it doesn't seem to matter how high I set receive.message.max.bytes or how low/high I set fetch.message.max.bytes I always get the error For example, I have tried setting receive.message.max.bytes to the max 1000000000. Then my understanding is that fetch.message.max.bytes * number of partitions consumed from (50) + messaging overhead must be < receive.message.max.bytes. Say, (1000000000 - 10%) / 50 = 18000000. For good measure I have also tried reducing fetch.message.max.bytes by an order of magnitude, and many other combinations. The only thing that may be strange about my setup is I have enable.auto.offset.store set to false. I have java based consumers that are able to work through the topic fine. Are there any other configurations I could be trying? |
A little more context for the above:
My broker version is 1.0.0 I've simplified my consumer to just be the hello world consumer from conluent-kafka-python
The exact consumer error I am getting is:
Though after digging deeper I also see occasional:
In the broker logs all I see is repeated:
Could the response size error be a red herring? I have also updated the max.message.bytes on my topic. Here is the full topic config:
|
I think I've narrowed this down to an issue with the particular version of librdkafka-dev that is distributed with debian. This is different than the version of librdkafka-dev that is distributed with alpine which is working fine for me. alpine:
debian:
|
The fix for this includes adding the (java) config property https://cwiki.apache.org/confluence/display/KAFKA/KIP-74%3A+Add+Fetch+Response+Size+Limit+in+Bytes |
…-74, #1616) `receive.message.max.bytes` was used in FetchRequest.max_bytes to tell the broker to limit the response size, but since the broker may overshoot this value up to one message.max.bytes it resulted in an endless config chase where receive.message.max.bytes was increased and the response size would follow + a couple of extra bytes. Using the new `fetch.max.bytes` property and making sure it is lower than `receive.message.max.bytes` fixes the issue. This also adds verification for these configuration values to the rd_kafka_new() call.
This is fixed on the KIP-74 branch, it would be great if (all of) you could try out this branch and verify that the fix works. The CONFIGURATION.md docs have been updated to show the relation between receive.message.max.bytes, fetch.max.bytes and message.max.bytes. How to: then do your app thing. |
…-74, #1616) `receive.message.max.bytes` was used in FetchRequest.max_bytes to tell the broker to limit the response size, but since the broker may overshoot this value up to one message.max.bytes it resulted in an endless config chase where receive.message.max.bytes was increased and the response size would follow + a couple of extra bytes. Using the new `fetch.max.bytes` property and making sure it is lower than `receive.message.max.bytes` fixes the issue.
…-74, #1616) `receive.message.max.bytes` was used in FetchRequest.max_bytes to tell the broker to limit the response size, but since the broker may overshoot this value up to one message.max.bytes it resulted in an endless config chase where receive.message.max.bytes was increased and the response size would follow + a couple of extra bytes. Using the new `fetch.max.bytes` property and making sure it is lower than `receive.message.max.bytes` fixes the issue.
I also have this issue using version 0.11.4 and Maybe this should be reopened to use a formula or at least configuration for the additional buffer size? |
@feigt Interesting, how long are your topic names? |
About 40 characters :) If you think that's impossible, here are some more details. 16 partitions, single producer consumer pair. Broker defaults, max message = max batch = fetch.max.bytes. Queue size 16 * fetch.max.bytes. The goal is to have enough memory to reliably fetch from all partitions with an upper bound. Producer sends small batches of up to 1000 messages. I was testing scenario where consumer is incapable of keeping up and hitting max fetch size. This scenario failed because of this problem. |
What file are we talking about adding these max bytes properties to? Is this the kafka-shared-config? My company is using the Confluent bundle, but I am getting this error, but for a producer. I am trying to connect via a python script. Here is my code. "kafka-confluent.apps.ocp-dev.gmso.com" is a route we setup. ` def acked(err, msg): p = Producer({'bootstrap.servers': 'kafka-confluent.apps.ocp-dev.gmso.com:80', p.produce('tony_test_for_python', key="hello", value='Hello World', callback=acked) There error I am getting is I added the following to my kafka-shared-config. The same yaml file that has message.max.bytes=2097164 Is it "fetch.max.bytes" or "fetch.message.max.bytes"? |
You seem to be connecting to an HTTP endpoint:
|
What does that mean? I mean, I know what it means to connect to an HTTP endpoing, but I don't know what that means in this context. What should it be connecting to? How would I even change that? I am pretty new to Kafka, and since we are using Confluent, there are very few things I setup myself. So, I am not sure what it should be using, or what I might be doing wrong. |
You are connecting to a web-server (port), not Kafka (which usually runs on port 9092). |
I have tried port 9092. I have tried all kinds of different setups. We were trying 80 because of some network stuff we tried. However, it seems all I need to provide is the route, and it will add the 9092 if I don't specify a port. Although, in the below code I specified the 9092 port just to be sure. With the following code, I get the following error.
Error:
|
Looks like there are networking issues, that's outside the client's control. |
Description
librdkafka v0.11.1
kafka broker v0.10.1.0
ReadHat 5 (x64)
consumer config:
receive.message.max.bytes=100000000
message size : 5242880(5M)
I have three consumers, they are all getting messages from one broker. My consumers is slow, but the producer is fast. So over time, the messages will pile up on the broker.
Then i get this from the consumer all the time, and my consumer can not receive messages any more:
%3|1514941148.962|FAIL|rdkafka#consumer-1| [thrd:172.20.51.38:9092/bootstrap]: 172.20.51.38:9092/1: Receive failed: Invalid response size 100000039 (0..100000000): increase receive.message.max.bytes
I know that messaging should be balanced. However, the accumulation of messages led to the consumer failed to receive I think it is a problem.
I think broker send messages using
receive.message.max.bytes
,But I do not understand why 39 bytes are added. Maybe it is the length of the head or something else. When i increasereceive.message.max.bytes
to 200000000, the problem is still not solved. Invalid response size is still 39 bytes more than my receive.message.max.bytes.%3|1514947746.873|FAIL|rdkafka#consumer-1| [thrd:172.20.51.38:9092/bootstrap]: 172.20.51.38:9092/1: Receive failed: Invalid response size 200000039 (0..200000000): increase receive.message.max.bytes %3|1514947746.873|ERROR|rdkafka#consumer-1| [thrd:172.20.51.38:9092/bootstrap]: 172.20.51.38:9092/1: Receive failed: Invalid response size 200000039 (0..200000000): increase receive.message.max.bytes
I think this may be related to internal judgment.
When i use another topic, i found the Invalid response size changed too.It became 100000038!
3|1514873845.371|FAIL|rdkafka#consumer-1| [thrd:172.20.51.39:9092/bootstrap]: 172.20.51.39:9092/2: Receive failed: Invalid response size 100000038 (0..100000000): increase receive.message.max.bytes
So i believe Invalid response size =
receive.message.max.bytes
+ 36 + length of the topicShould this length be deducted when judging?
I am not sure whether my guess is correct or not. How to deal with this imbalance in sending and receiving information?
How to reproduce
Just make sure the producer generates messages faster than the consumer consumes
Checklist
IMPORTANT: We will close issues where the checklist has not been completed.
Please provide the following information:
<0.10.1.0>
<receive.message.max.bytes=100000000,fetch.message.max.bytes=100000000>
<ReadHat 5 (x64)>
debug=..
as necessary) from librdkafkaThe text was updated successfully, but these errors were encountered: