Expire UserMap cache more aggressively and add cache debugging #5331
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #5327
There are a couple of issues with the usercache, namely:
Solution:
max memory / 1024 / 96
tomax memory / 1024 / 1024
.Worth mentioning is that in the linked issue, for some reason, all ~63,000 users were being cached. This should not happen normally with typical usage of the cache, and implies that (probably some plugin) something is loading every user into the cache. To help debug this I've added another system property to log every time something gets added to the cache.