Skip to content
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

maxHeaderSize is exceeding default value of 8192bytes and causing exception #5665

Closed
clever-trevor opened this issue Apr 2, 2014 · 3 comments

Comments

@clever-trevor
Copy link

I'm using Elasticsearch behind an Apache reverse proxy, coupled with VAS authentication.

On certain occasions, the header size is exceeding 8192 bytes (error below) and ES throws an exception which causes the request to fail.

It looks like maxHeaderSize in the netty module is defaulting to 8192 bytes, but I can't find any way of overriding (increasing) this value, and if not, can it be added as a configurable parameter in the yml file?

[2014-04-02 08:42:11,500][WARN ][http.netty ] [xxxxx] Caught exception while handling client http traffic, closing connection [id: 0x121a4d3d, /127.0.0.1:33167 => /127.0.0.1:9200]

org.elasticsearch.common.netty.handler.codec.frame.TooLongFrameException: HTTP header is larger than 8192 bytes.
at org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.readHeader(HttpMessageDecoder.java:596)

@dakrone
Copy link
Member

dakrone commented Apr 2, 2014

Hi @schmorgs, you should be able to configure this with:

http.max_header_size: 16kb

In elasticsearch.yml

Closing this for now, if you need to follow up the mailing list is probably the best place for questions like this: https://groups.google.com/forum/?fromgroups#!forum/elasticsearch

@dakrone dakrone closed this as completed Apr 2, 2014
@clever-trevor
Copy link
Author

Excellent, thank you so much. I’ve spent 4 hours today looking at how to solve this :)

From: Lee Hinman [mailto:notifications@github.com]
Sent: 02 April 2014 20:45
To: elasticsearch/elasticsearch
Cc: schmorgs
Subject: Re: [elasticsearch] maxHeaderSize is exceeding default value of 8192bytes and causing exception (#5665)

Hi @schmorgs https://github.com/schmorgs , you should be able to configure this with:

http.max_header_size: 16kb

In elasticsearch.yml

Closing this for now, if you need to follow up the mailing list is probably the best place for questions like this: https://groups.google.com/forum/?fromgroups#!forum/elasticsearch


Reply to this email directly or view it on GitHub #5665 (comment) . https://github.com/notifications/beacon/5444727__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMjA4NzEwNiwiZGF0YSI6eyJpZCI6MjkxMzA2OTZ9fQ==--a3aa48e20ffa0a3644fe1174c80845066640076a.gif

@denispeplin
Copy link

Thanks!
It fixed the issue.

  1. Probably, it was caused by some cookies for localhost, sent by Chrome, which I use most.
  2. 127.0.0.1 worked fine.
  3. From Firefox, localhost worked fine.
  4. From Chrome, it was just 'connection error'
  5. The exception name, TooLongFrameException, gives nothing useful when googling.
  6. The setting doesn't even appear in default elasticsearch.yml config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants