By default Lucene allocates 32MB of ram for a LRU cache for each instance. When allocating very large amounts of cache slots (ie, 200, 500) this can represent a very large demand on memory required.
If insufficient ram is allocated to the machine, it will eventually crash with a failed socket / healthcheck (not an OOM). This is because the GC will more aggressively attempt to reclaim memory until the healthcheck becomes too slow.
We should ideally immediately fatal error the cache boot process if the allocated JVM memory is insufficient for the configured LRU cache + cache slot configuration.
Description
By default Lucene allocates 32MB of ram for a LRU cache for each instance. When allocating very large amounts of cache slots (ie, 200, 500) this can represent a very large demand on memory required.
If insufficient ram is allocated to the machine, it will eventually crash with a failed socket / healthcheck (not an OOM). This is because the GC will more aggressively attempt to reclaim memory until the healthcheck becomes too slow.
We should ideally immediately fatal error the cache boot process if the allocated JVM memory is insufficient for the configured LRU cache + cache slot configuration.