Like any software raised on linux, even where it runs under a JVM like Elasticsearch, running it on windows bring to light a few quirks.
One of the most common Elastic Search Environment Variables is ES_HEAP_SIZE, shown in the System variable panel below.
With the default set to 1GB, setting this is often done early on, though note the following 2 gotcha's in windows.
- After you set the ES_HEAP_SIZE, you need to re-install the service. Restarting ES won't do it.
- If you are restarting the service from the command line, remember to open a new CMD window after setting the Environment Variables, A stale window will hold the old value, (or have none if none was set) and restarting the service in that cmd.exe session won't update the heap size.
Here is how you can ensure that your Environment Variable took under the JVM section via /_nodes/stats?pretty=true
Also, remember to not cross 31Gb!