Skip to content

Commit

Permalink
Merge pull request #1 from alxhu-dev/alxhu-dev-patch-1
Browse files Browse the repository at this point in the history
Add hint to allocate more memory if Elasticsearch crashes
  • Loading branch information
alxhu-dev committed Jun 1, 2024
2 parents 58deaeb + 5a85923 commit deb1aee
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions content/en/admin/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,23 @@ cd live
RAILS_ENV=production bin/tootctl search deploy
```

{{< hint style="info" >}}
Creating Elasticsearch indicies could require more memory than the JVM (Java Virtual Machine) provides. If Elasticsearch crashes while creating indicies, try to allocate more memory.

1. Create and open a file in the directory ```/etc/elasticsearch/jvm.options.d/``` (for example: ```nano /etc/elasticsearch/jvm.options.d/ram.options```)
2. Add following text and edit the allocated memory to your needs. As a rule of thumb, Elasticsearch should use about 25%-50% of your available memory. Do not allocate more memory than available.
```
# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
# Both values should be the same
-Xms2048m
-Xmx2048m
```
3. Save the file.
4. Restart Elasticsearch using ```systemctl restart elasticsearch```.
5. Retry creating Elasticsearch indicies. If Elasticsearch still crashes, try to set a higher number.
{{< /hint >}}

## Search optimization for other languages
### Chinese search optimization {#chinese-search-optimization}

Expand Down

0 comments on commit deb1aee

Please sign in to comment.