-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Elasticsearch: Request Entity Too Large #28117
Comments
The repository sizes (as reported in the gitea web ui) from some repositories that I picked out of the log are:
That makes me wonder if the small repositories are batched together with the big ones which then exceeds the request limit. Reducing the max file size to |
Me 2 having the same issue. |
to inferno-umar : Does this answer help? update: MarkusAmshove's report said that they have tried |
Unfortunately, after a quick look, I think your guess is right ... maybe Gitea does put everything into one request and send it to elasticsearch, since the first elasticsearch PR: #10273 gitea/modules/indexer/code/elasticsearch/elasticsearch.go Lines 182 to 188 in 688d4a1
|
Yeah! you're right Gitea is putting everything in 1 request before sending it to elastic search, not batching it, as shown in my error logs below:
|
After finding out I pushed my elasticsearch maximum limit to
|
I'm trying to fix this issue in the code by batching the requests
|
Fix for gitea putting everything into one request without batching and sending it to Elasticsearch for indexing as issued in #28117 This issue occured in large repositories while Gitea tries to index the code using ElasticSearch. I've applied necessary changes that takes batch length from below config (app.ini) ``` [queue.code_indexer] BATCH_LENGTH=<length_int> ``` and batches all requests to Elasticsearch in chunks as configured in the above config
…#29062) Fix for gitea putting everything into one request without batching and sending it to Elasticsearch for indexing as issued in go-gitea#28117 This issue occured in large repositories while Gitea tries to index the code using ElasticSearch. I've applied necessary changes that takes batch length from below config (app.ini) ``` [queue.code_indexer] BATCH_LENGTH=<length_int> ``` and batches all requests to Elasticsearch in chunks as configured in the above config
Backport #29062 by @inferno-umar Fix for gitea putting everything into one request without batching and sending it to Elasticsearch for indexing as issued in #28117 This issue occured in large repositories while Gitea tries to index the code using ElasticSearch. Co-authored-by: dark-angel <[email protected]>
Fixed by #29075 |
…#29062) Fix for gitea putting everything into one request without batching and sending it to Elasticsearch for indexing as issued in go-gitea#28117 This issue occured in large repositories while Gitea tries to index the code using ElasticSearch. I've applied necessary changes that takes batch length from below config (app.ini) ``` [queue.code_indexer] BATCH_LENGTH=<length_int> ``` and batches all requests to Elasticsearch in chunks as configured in the above config
…o-gitea#29062) Fix for gitea putting everything into one request without batching and sending it to Elasticsearch for indexing as issued in go-gitea#28117 This issue occured in large repositories while Gitea tries to index the code using ElasticSearch. I've applied necessary changes that takes batch length from below config (app.ini) ``` [queue.code_indexer] BATCH_LENGTH=<length_int> ``` and batches all requests to Elasticsearch in chunks as configured in the above config (cherry picked from commit 5c0fc90)
Automatically locked because of our CONTRIBUTING guidelines |
Description
I've tried to enable code indexing in our instance using Elasticsearch, but I get the following error for a lot of repositories:
I've changed the setting
http.max_content_length
in the Elasticsearch config to the maximum possile value2147483647b
but the error still comes up.This also comes up for a lot of repositories, not just our biggest ones.
I'm unsure how the indexer works, does it take the whole sourcecode of a branch and pumps it into elastic? Is some kind of batching per x files needed?
Gitea Version
1.21.0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Running Gitea on Linux amd64 with the official binary and Elasticsearch within Docker
Database
None
The text was updated successfully, but these errors were encountered: