mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-27 08:23:41 +01:00
Fix "Too many open files" errors when using ElasticSearch
This change sets the Faraday adapter used for ElasticSearch to `:net_http`.
The `elasticsearch-transport` gem tries to auto detect a suitable Faraday
adapter. Mastodon uses the Faraday default adapter of `:net_http`, but since
`elasticsearch-transport` sees that the `httpclient` gem is available it lets
Faraday use that one. Unfortunately `httpclient` does not properly clean up
its connections, leading to a lot of established connections to ElasticSearch
over time.
See also: e074fcff9b/lib/elastic/transport/client.rb (L291-L304)
(https://github.com/mastodon/mastodon/pull/27138)
This commit is contained in:
parent
9fd1e79e95
commit
59be64f1d6
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ Chewy.settings = {
|
|||
index: {
|
||||
number_of_replicas: ['single_node_cluster', nil].include?(ENV['ES_PRESET'].presence) ? 0 : 1,
|
||||
},
|
||||
adapter: :net_http,
|
||||
}
|
||||
|
||||
# We use our own async strategy even outside the request-response
|
||||
|
|
Loading…
Reference in a new issue