# Message of length too large or too small

**URL:** <https://discuss.elastic.co/t/message-of-length-too-large-or-too-small/181563>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 17, 2019, 9:53am UTC](https://discuss.elastic.co/t/message-of-length-too-large-or-too-small/181563 "2019-05-17T09:53:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joongwan\_koo](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@joongwan\_koo](https://discuss.elastic.co/u/joongwan_koo)\
**Post date:** [May 17, 2019, 9:53am UTC](https://discuss.elastic.co/t/message-of-length-too-large-or-too-small/181563/1 "2019-05-17T09:53:33Z")

</div>

Hi i makeing a log anslysis system using elastic  
It worked well in the test environment, but the following error occurred int the live environment.  
the target log file size is 140M , and error message is more 1g

system flow  
apache log --\> filebeat --\> kafka

filebeat (yml)  
filebeat.prospectors:

- type: log  
enabled: true  
paths:  
- /logs/apache\_access/access\_log.20190517  
tail\_files: true  
ignore\_older: 1m  
close\_inactive: 2m  
clean\_inactive: 15m  
harvester\_buffer\_size: 16384  
apache: true  
output.kafka:  
hosts: ["xxx.xxx.xxx.xxx:9092"]  
topic: "apache\_log"  
required\_acks: 1  
compression: gzip  
max\_message\_bytes: 1000000

## -- error message -- kafka/log.go:53 producer/broker/0 state change to [closing] because kafka: error decoding packet: message of length 1397966893 too large or too small

please help.  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)\
**Post date:** [May 23, 2019, 12:54am UTC](https://discuss.elastic.co/t/message-of-length-too-large-or-too-small/181563/2 "2019-05-23T00:54:03Z")

</div>

This is weird looking at your configuration I see `max_message_bytes` which should drop any events bigger than `1000000` and `1397966893` is a lot bigger than that.

Is the watched log file have each log statement on a new line?

---

<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 20, 2019, 12:54am UTC](https://discuss.elastic.co/t/message-of-length-too-large-or-too-small/181563/3 "2019-06-20T00:54:03Z")

</div>

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