# ERR Kafka (topic=stack): dropping too large message of size 1262765

**URL:** <https://discuss.elastic.co/t/err-kafka-topic-stack-dropping-too-large-message-of-size-1262765/85122>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 9, 2017, 3:10pm UTC](https://discuss.elastic.co/t/err-kafka-topic-stack-dropping-too-large-message-of-size-1262765/85122 "2017-05-09T15:10:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mw-0](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@mw-0](https://discuss.elastic.co/u/mw-0)\
**Post date:** [May 9, 2017, 3:10pm UTC](https://discuss.elastic.co/t/err-kafka-topic-stack-dropping-too-large-message-of-size-1262765/85122/1 "2017-05-09T15:10:55Z")

</div>

Hi,

I have been testing out filebeat 5.3 and now 5.4 but keep getting these errors and cannot find which config entry will solve it.  
I have configured 2 log files which produce about 16 lines per second combined and i am not using multiline.

if i configure a single log file for input then i do not get these errors.

2017-05-09T15:04:23Z INFO Non-zero metrics in the last 30s: libbeat.kafka.call\_count.PublishEvents=6 libbeat.kafka.published\_and\_acked\_events=1489 libbeat.output.kafka.bytes\_read=3266 libbeat.output.kafka.bytes\_write=166811 libbeat.publisher.published\_events=1489 publish.events=1490 registrar.states.update=1490 registrar.writes=6  
2017-05-09T15:04:26Z ERR Kafka (topic=stack): dropping too large message of size 1006373.  
2017-05-09T15:04:31Z ERR Kafka (topic=stack): dropping too large message of size 1006407.  
2017-05-09T14:52:16Z ERR Kafka (topic=stack): dropping too large message of size 4220939

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [May 9, 2017, 10:44pm UTC](https://discuss.elastic.co/t/err-kafka-topic-stack-dropping-too-large-message-of-size-1262765/85122/2 "2017-05-09T22:44:04Z")

</div>

a message to kafka is not just the original line in your config file, but the full json-encoded event being published. If you run filebeat with `-d '*'`, you will see the actual event to be published.

Kafka enforces a limit on event sizes. Depending on event meta-data size, you want to configure the max message size in the filebeat prospector + some delta. Also consider adding processors to remove some not required meta data from the event to be published to kafka.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 6, 2017, 10:47pm UTC](https://discuss.elastic.co/t/err-kafka-topic-stack-dropping-too-large-message-of-size-1262765/85122/3 "2017-06-06T22:47:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
