slackhq / astra

Astra is a structured log search and analytics engine developed by Slack and Salesforce
https://slackhq.github.io/astra/
MIT License
209 stars 28 forks source link

Cache node should gracefully handle over-provisioned LRU cache configs #673

Open bryanlb opened 1 year ago

bryanlb commented 1 year ago

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.

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days.