My VRT Redis Memory is getting full day by day, How I can find the most memory occupied hash/cache.
Run the below command on redis server:
- redis-cli --bigkeys
- You can see the most memory occupied hash/cache.
- Credit goes to @DebugHorror
Thanks @naveen.gupta.
Just to add, This will show you the list of keys that are the biggest in size. Why are they consuming that much is all together a different question and need to be looked at. The reason can be different in different scenarios.
Also check TTL for TXN and Session Keys, they should expire after certain time interval.
Can you check and let us know that user session expires after 15 minutes interval.
Log into mobile application and keep it idle for 15 minutes and check that session and TXN key should expire,
This should be taken care of and validated by Vahana because as clients, we are not inputting any data into Redis. Why is it getting full, and what is the minimum RAM size for Redis?
As per redis documentation below are the memory footprints:
- An empty instance uses ~ 3MB of memory.
- 1 Million small Keys → String Value pairs use ~ 85MB of memory.
- 1 Million Keys → Hash value, representing an object with 5 fields, use ~ 160 MB of memory.