# Exception in netty while indexing, :(

**URL:** <https://discuss.elastic.co/t/exception-in-netty-while-indexing/4987>\
**Category:** Elasticsearch\
**Created:** [July 28, 2011, 3:00pm UTC](https://discuss.elastic.co/t/exception-in-netty-while-indexing/4987 "2011-07-28T15:00:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antonio\_Lobato](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antonio_lobato/32/2681_2.png) [@Antonio\_Lobato](https://discuss.elastic.co/u/Antonio_Lobato)\
**Post date:** [July 28, 2011, 3:00pm UTC](https://discuss.elastic.co/t/exception-in-netty-while-indexing/4987/1 "2011-07-28T15:00:14Z")

</div>

Hi everyone!

While trying to index some really big documents into an Elasticsearch  
cluster, we received the following error:

[2011-07-28 01:24:22,183][WARN][http.netty]  
[Damballah] Caught exception while handling client http traffic,  
closing connection  
org.elasticsearch.common.netty.handler.codec.frame.TooLongFrameException:  
An HTTP line is larger than 4096 bytes.  
at  
org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.readLine(HttpMessageDecoder.java:  
592)  
at  
org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:  
191)  
at  
org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:  
107)  
at  
org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:  
470)  
at  
org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:  
443)  
at  
org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:  
80)  
at  
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:  
545)  
at  
org.elasticsearch.common.netty.channel.DefaultChannelPipeline  
$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:  
754)  
at  
org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:  
65)  
at  
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:  
545)  
at  
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:  
540)  
at  
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:  
274)  
at  
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:  
261)  
at  
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:  
349)  
at  
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:  
280)  
at  
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:  
200)  
at  
org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:  
108)  
at  
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker  
$1.run(DeadLockProofWorker.java:44)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:  
1110)  
at java.util.concurrent.ThreadPoolExecutor  
$Worker.run(ThreadPoolExecutor.java:603)  
at java.lang.Thread.run(Thread.java:636)

Ideas? Thanks!

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 28, 2011, 3:18pm UTC](https://discuss.elastic.co/t/exception-in-netty-while-indexing/4987/2 "2011-07-28T15:18:34Z")

</div>

How are you indexing data? It seems like an http header line was sent that  
is bigger than 4096?

On Thu, Jul 28, 2011 at 6:00 PM, Antonio Lobato [aj.lobato@gmail.com](mailto:aj.lobato@gmail.com) wrote:

> Hi everyone!
> 
> While trying to index some really big documents into an Elasticsearch  
> cluster, we received the following error:
> 
> [2011-07-28 01:24:22,183][WARN][http.netty]  
> [Damballah] Caught exception while handling client http traffic,  
> closing connection  
> org.elasticsearch.common.netty.handler.codec.frame.TooLongFrameException:  
> An HTTP line is larger than 4096 bytes.  
> at
> 
> org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.readLine(HttpMessageDecoder.java:  
> 592)  
> at
> 
> org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:  
> 191)  
> at
> 
> org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:  
> 107)  
> at
> 
> org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:  
> 470)  
> at
> 
> org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:  
> 443)  
> at
> 
> org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:  
> 80)  
> at
> 
> org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:  
> 545)  
> at  
> org.elasticsearch.common.netty.channel.DefaultChannelPipeline  
> $DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:  
> 754)  
> at
> 
> org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:  
> 65)  
> at
> 
> org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:  
> 545)  
> at
> 
> org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:  
> 540)  
> at
> 
> org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:  
> 274)  
> at
> 
> org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:  
> 261)  
> at
> 
> org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:  
> 349)  
> at
> 
> org.elasticsearch.common.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:  
> 280)  
> at
> 
> org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:  
> 200)  
> at
> 
> org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:  
> 108)  
> at  
> org.elasticsearch.common.netty.util.internal.DeadLockProofWorker  
> $1.run(DeadLockProofWorker.java:44)  
> at  
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:  
> 1110)  
> at java.util.concurrent.ThreadPoolExecutor  
> $Worker.run(ThreadPoolExecutor.java:603)  
> at java.lang.Thread.run(Thread.java:636)
> 
> Ideas? Thanks!

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 28, 2011, 3:34pm UTC](https://discuss.elastic.co/t/exception-in-netty-while-indexing/4987/3 "2011-07-28T15:34:24Z")

</div>

Still strange that you get it, but, I added options to allow to control it:  
[Http Transport: Allow to configure `max_header_size`, `max_initial_line_length`, and `max_chunk_size` · Issue #1174 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1174).

On Thu, Jul 28, 2011 at 6:18 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> How are you indexing data? It seems like an http header line was sent that  
> is bigger than 4096?
> 
> On Thu, Jul 28, 2011 at 6:00 PM, Antonio Lobato [aj.lobato@gmail.com](mailto:aj.lobato@gmail.com)wrote:
> 
> > Hi everyone!
> > 
> > While trying to index some really big documents into an Elasticsearch  
> > cluster, we received the following error:
> > 
> > [2011-07-28 01:24:22,183][WARN][http.netty]  
> > [Damballah] Caught exception while handling client http traffic,  
> > closing connection  
> > org.elasticsearch.common.netty.handler.codec.frame.TooLongFrameException:  
> > An HTTP line is larger than 4096 bytes.  
> > at
> > 
> > org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.readLine(HttpMessageDecoder.java:  
> > 592)  
> > at
> > 
> > org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:  
> > 191)  
> > at
> > 
> > org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:  
> > 107)  
> > at
> > 
> > org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:  
> > 470)  
> > at
> > 
> > org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:  
> > 443)  
> > at
> > 
> > org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:  
> > 80)  
> > at
> > 
> > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:  
> > 545)  
> > at  
> > org.elasticsearch.common.netty.channel.DefaultChannelPipeline  
> > $DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:  
> > 754)  
> > at
> > 
> > org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:  
> > 65)  
> > at
> > 
> > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:  
> > 545)  
> > at
> > 
> > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:  
> > 540)  
> > at
> > 
> > org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:  
> > 274)  
> > at
> > 
> > org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:  
> > 261)  
> > at
> > 
> > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:  
> > 349)  
> > at
> > 
> > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:  
> > 280)  
> > at
> > 
> > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:  
> > 200)  
> > at
> > 
> > org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:  
> > 108)  
> > at  
> > org.elasticsearch.common.netty.util.internal.DeadLockProofWorker  
> > $1.run(DeadLockProofWorker.java:44)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:  
> > 1110)  
> > at java.util.concurrent.ThreadPoolExecutor  
> > $Worker.run(ThreadPoolExecutor.java:603)  
> > at java.lang.Thread.run(Thread.java:636)
> > 
> > Ideas? Thanks!

---

<div class="post-metadata">

**Author:** ![Antonio\_Lobato](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antonio_lobato/32/2681_2.png) [@Antonio\_Lobato](https://discuss.elastic.co/u/Antonio_Lobato)\
**Post date:** [July 28, 2011, 9:03pm UTC](https://discuss.elastic.co/t/exception-in-netty-while-indexing/4987/4 "2011-07-28T21:03:44Z")

</div>

We're indexing using a custom written REST client. I'm actually not  
quite sure why the header sent was larger than 4096. I'll  
investigate.

Thanks though! 🙂

On Jul 28, 11:34 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Still strange that you get it, but, I added options to allow to control it:[Http Transport: Allow to configure `max_header_size`, `max_initial_line_length`, and `max_chunk_size` · Issue #1174 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1174).
> 
> On Thu, Jul 28, 2011 at 6:18 PM, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > How are you indexing data? It seems like an http header line was sent that  
> > is bigger than 4096?
> 
> > On Thu, Jul 28, 2011 at 6:00 PM, Antonio Lobato [aj.lob...@gmail.com](mailto:aj.lob...@gmail.com)wrote:
> 
> > > Hi everyone!
> 
> > > While trying to index some really big documents into an Elasticsearch  
> > > cluster, we received the following error:
> 
> > > [2011-07-28 01:24:22,183][WARN][http.netty]  
> > > [Damballah] Caught exception while handling client http traffic,  
> > > closing connection  
> > > org.elasticsearch.common.netty.handler.codec.frame.TooLongFrameException:  
> > > An HTTP line is larger than 4096 bytes.  
> > > at
> 
> > > org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.readLi ne(HttpMessageDecoder.java:  
> > > 592)  
> > > at
> 
> > > org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.decode (HttpMessageDecoder.java:  
> > > 191)  
> > > at
> 
> > > org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.decode (HttpMessageDecoder.java:  
> > > 107)  
> > > at
> 
> > > org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.callDe code(ReplayingDecoder.java:  
> > > 470)  
> > > at
> 
> > > org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.messag eReceived(ReplayingDecoder.java:  
> > > 443)  
> > > at
> 
> > > org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleU pstream(SimpleChannelUpstreamHandler.java:  
> > > 80)  
> > > at
> 
> > > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream( DefaultChannelPipeline.java:  
> > > 545)  
> > > at  
> > > org.elasticsearch.common.netty.channel.DefaultChannelPipeline  
> > > $DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:  
> > > 754)  
> > > at
> 
> > > org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChann elsHandler.java:  
> > > 65)  
> > > at
> 
> > > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream( DefaultChannelPipeline.java:  
> > > 545)  
> > > at
> 
> > > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream( DefaultChannelPipeline.java:  
> > > 540)  
> > > at
> 
> > > org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channel s.java:  
> > > 274)  
> > > at
> 
> > > org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channel s.java:  
> > > 261)  
> > > at
> 
> > > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker. java:  
> > > 349)  
> > > at
> 
> > > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.processSelected Keys(NioWorker.java:  
> > > 280)  
> > > at
> 
> > > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.j ava:  
> > > 200)  
> > > at
> 
> > > org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenami ngRunnable.java:  
> > > 108)  
> > > at  
> > > org.elasticsearch.common.netty.util.internal.DeadLockProofWorker  
> > > $1.run(DeadLockProofWorker.java:44)  
> > > at  
> > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:  
> > > 1110)  
> > > at java.util.concurrent.ThreadPoolExecutor  
> > > $Worker.run(ThreadPoolExecutor.java:603)  
> > > at java.lang.Thread.run(Thread.java:636)
> 
> > > Ideas? Thanks!

---

<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:** [July 6, 2017, 3:58am UTC](https://discuss.elastic.co/t/exception-in-netty-while-indexing/4987/5 "2017-07-06T03:58:56Z")

</div>


