[Bug]: On the Search page,Search BadRequestError('too_long_http_line_exception . For Elasticsearch and http request bug
Is there an existing issue for the same bug?
- [x] I have checked the existing issues.
RAGFlow workspace code commit ID
v0.16.0 bug
RAGFlow image version
v0.16.0
Other environment information
v0.16.0 version, Centos operating system, Nvidia CUDA deployment. docker-compose-gpu.yml. Start
Actual behavior
Search function page error
Expected behavior
Causes of interface error and solutions to the bug
Steps to reproduce
On the Search page, I used the bge-m3 embedding model and selected more than 100 datasets for search and answering.
Additional information
BadRequestError('too_long_http_line_exception', meta=ApiResponseMeta(status=400, http_version='1.1', headers={'X-elastic-product': 'Elasticsearch', 'content-type': 'application/json', 'content-length': '219'}, duration=0.008252620697021484, node=NodeConfig(scheme='http', host='es01', port=9200, path_prefix='', headers={'user-agent': 'elasticsearch-py/8.12.1 (Python/3.10.12; elastic-transport/8.12.0)'}, connections_per_node=10, request_timeout=10.0, http_compress=False, verify_certs=False, ca_certs=None, client_cert=None, client_key=None, ssl_assert_hostname=None, ssl_assert_fingerprint=None, ssl_version=None, ssl_context=None, ssl_show_warn=True, _extras={})), body={'error': {'root_cause': [{'type': 'too_long_http_line_exception', 'reason': 'An HTTP line is larger than 4096 bytes.'}], 'type': 'too_long_http_line_exception', 'reason': 'An HTTP line is larger than 4096 bytes.'}, 'status': 400})
What's the operation to re-produce it?
The number of knowledge bases exceeds 600. If you select all knowledge bases on the page, the search function will inevitably show this error.
In the docker-compose-base.yml file of ragflow, find the es service and add the following line under environment:
- http.max_initial_line_length=8k
This increases the HTTP line length limit for Elasticsearch and resolves the too_long_http_line_exception error.