# TCP input message size problem, maybe a bug

**URL:** <https://discuss.elastic.co/t/tcp-input-message-size-problem-maybe-a-bug/178615>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 26, 2019, 9:57am UTC](https://discuss.elastic.co/t/tcp-input-message-size-problem-maybe-a-bug/178615 "2019-04-26T09:57:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SuperChia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/superchia/32/45086_2.png) [@SuperChia](https://discuss.elastic.co/u/SuperChia)\
**Post date:** [April 26, 2019, 9:57am UTC](https://discuss.elastic.co/t/tcp-input-message-size-problem-maybe-a-bug/178615/1 "2019-04-26T09:57:01Z")

</div>

When Filebeat uses “TCP input”, you can set the option "`max_message_size`" as maximum size in bytes of the message received over TCP. But, there is another option that limits the message size when Filebeat calls "`scanner.Scan()`" to collect data: "`MaxScanTokenSize`", the meaning of this option is the maximum size used to buffer a message. Filebeat does not override "`MaxScanTokenSize`" with "`max_message_size`", which causes an error when the value of "`max_message_size`" we set is greater than "`MaxScanTokenSize`" and the length of our message is greater than "`MaxScanTokenSize`" and less than "`max_message_size`". (position: filebeat/inputsource/tcp) . beats version: 6.5.4, but 7.0 also has this problem.

---

<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:** [April 26, 2019, 3:39pm UTC](https://discuss.elastic.co/t/tcp-input-message-size-problem-maybe-a-bug/178615/2 "2019-04-26T15:39:34Z")

</div>

This looks like a bug to me. Can you open an bug report please: [https://github.com/elastic/beats/issues/new/choose](https://github.com/elastic/beats/issues/new/choose)

---

<div class="post-metadata">

**Author:** ![SuperChia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/superchia/32/45086_2.png) [@SuperChia](https://discuss.elastic.co/u/SuperChia)\
**Post date:** [April 27, 2019, 3:08am UTC](https://discuss.elastic.co/t/tcp-input-message-size-problem-maybe-a-bug/178615/3 "2019-04-27T03:08:43Z")

</div>

Thank you for your reply. I have already reported it.  
[https://github.com/elastic/beats/issues/11966](https://github.com/elastic/beats/issues/11966)

---

<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:** [May 25, 2019, 3:08am UTC](https://discuss.elastic.co/t/tcp-input-message-size-problem-maybe-a-bug/178615/4 "2019-05-25T03:08:47Z")

</div>

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