Redis Fix - namespace key can grow to GB size
See original GitHub issueDescribe the bug
Since I migrated to keyv
it looks like the amount of freeable memory is declining in constant rate: https://imgur.com/a/77kOTD7 (20 Jul is when I released changes for keyv
migration).
I expect it to be related to the namespace:...
key, that in my case can grow to more than 15GB in actively used cache.
To Reproduce
I would expect that adding a bunch of big keys for short living values will cause the namespace:...
size to constantly grow.
Expected behavior I would expect to have some auto-purging mechanism?
Tests (Bonus!!!) N/A
Additional context N/A
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Redis: Show database size/size for keys - Stack Overflow
So my solution to my own problem: After playing around with redis-cli a bit longer I found out that DEBUG OBJECT <key> reveals...
Read more >MEMORY USAGE - Redis
The MEMORY USAGE command reports the number of bytes that a key and its value require to be stored in RAM. The reported...
Read more >Redis Namespace and Other Keys to Developing with Redis
For example: consider that storing 1,000,000 keys with Redis namespace, each set with a 32-character value, will consume about 96MB when using 6 ......
Read more >Redis Keys Standard Naming Conventions. - W3schools.io
Redis keys standard naming conventions size, namespace, separator used for designing keys for better readable, maintainable, and faster lookups.
Read more >[core] External Redis does not work for new clusters #17400
See https://discuss.ray.io/t/how-can-i-connect-to-pre-created-redis- ... you can increase /dev/shm size by passing '–shm-size=2.40gb' to 'docker run' (or ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have another issue around
this.redis.sadd(
. I use commandTimeout option and some errors dont catch in project-code. As it turned out, these are timeouts on thesadd
command. Until I figured out why mycatch
does not work and the error goes tounhandledRejection
. I need the ability to disable this, I also have to makeclass MyKeyvRedis extends KeyvRedis
in the project and override not only theset
method, but alsoclear
(removesmembers
, addthrow new MyError
) anddelete
(removesrem
).As a temporary workaround, I use the following code:
As you can see, I removed
this.redis.sadd(this._getNamespace(), key);