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
Clearing a scroll occasionally raises a 'too_long_frame_exception' #141
Comments
I found the same issue while trying to use Logstash (7.10.1) to export documents from an Elasticsearch 5.6 to an Elasticsearch 7.10 for migration purposes. This plugin constantly stopped hitting the limit of bytes an URL can have. I've tried to change the number of documents pulled in every request but to not avail.
Workaround: |
i have the same error. I am using 7.12v [2021-06-28T20:34:00,424][WARN ][logstash.inputs.elasticsearch][main][7a954ab2ef611db5ce0e3a2fd1dcb214cd1202eeebdaaccfcd90f30b6a87be7f] Ignoring clear_scroll exception {:message=>"[400] {"error":{"root_cause":[{"type":"too_long_frame_exception","reason":"An HTTP line is larger than 4096 bytes."}],"type":"too_long_frame_exception","reason":"An HTTP line is larger than 4096 bytes."},"status":400}"} Does anyone know how to get the http request that logstash is sending? |
@Dani9814 You can run it in Debug like I did (message above). Logstash is going over the limit (in the output above I've substituted the real URL by "REDACTED**4369Bytes" )
|
Thanks @juan-domenech i was able to see the request. I saw the same as you . The delete scroll query has a huge scroll id in the url because of this the url has more than 4096 bytes. I was searching how to solve it and i see this post https://discuss.elastic.co/t/ridiculously-long-scroll-id/12913/3. In that thread they said that scroll id should go in the body not on the url. So i think this is a bug. The problem is that i got this message in only a index currently I think i am going to test the version Logstash v5.6 |
I'm encountering this issue as well, using the same Docker image as @JAndritsch. The error is caused by Logstash sending a
As mentioned, the fix is to send the scroll ID in the body instead of the URL. I'll poke around to see if there's an easy fix in this repository.
|
The current usage of logstash-input-elasticsearch/lib/logstash/inputs/elasticsearch.rb Lines 349 to 354 in 629eea9
Passing the def clear_scroll(scroll_id)
- @client.clear_scroll(scroll_id: scroll_id) if scroll_id
+ @client.clear_scroll(body: { :scroll_id => scroll_id }) if scroll_id
rescue => e
# ignore & log any clear_scroll errors
logger.warn("Ignoring clear_scroll exception", message: e.message, exception: e.class)
end |
This should resolve the `too_long_frame_exception` issue described in logstash-plugins#141.
This should resolve the `too_long_frame_exception` issue described in #141.
Closing this issue as it has been fixed by #159 and released in logstash-input-elasticsearch 4.12.1 |
I am using Logstash to pull documents from Elasticsearch via a cron schedule (see config below). The process to close the scrolls once they're done sometimes results in a
too_long_frame_exception
error, leaving the scroll(s) open until they time out.Below is an example of the error message thrown by Logstash when it tries to close a scroll and fails:
I'm not sure what the exact steps are to reproduce this, aside from opening a bunch of scrolls and seeing if they all close properly.
The text was updated successfully, but these errors were encountered: