It is really long to explain why I use streams for simple task (and I can’t change it)
but at the moment I save multiple datas into different keys which are associated with streams.
After data is got from the stream with XRANGE I need to completely destroy the data,key.
Yes, just one access to the stream and everything has to be destroyed.
I tried everything. I tried expire 0 on the key, del, xtrim maxlen of 0 (and then del) and nothing works and my memory keeps getting bigger until exhaustion.
Even if 1 key (stream) is used, XRANGEd then deleted same memory leak applies.
What i see is
Memory
used_memory:27305504
used_memory_human:26.04M
used_memory_rss:17321984
used_memory_rss_human:16.52M
used_memory_peak:27349928
used_memory_peak_human:26.08M
used_memory_peak_perc:99.84%
used_memory_overhead:681540
used_memory_startup:660608
used_memory_dataset:26623964
used_memory_dataset_perc:99.92%
allocator_allocated:29209872
allocator_active:38076416
allocator_resident:38535168
total_system_memory:2050424832
total_system_memory_human:1.91G
used_memory_lua:37888
used_memory_lua_human:37.00K
used_memory_scripts:0
used_memory_scripts_human:0B
number_of_cached_scripts:0
maxmemory:33554432
maxmemory_human:32.00M
maxmemory_policy:volatile-lru
allocator_frag_ratio:1.30
allocator_frag_bytes:8866544
allocator_rss_ratio:1.01
allocator_rss_bytes:458752
rss_overhead_ratio:0.45
rss_overhead_bytes:-21213184
mem_fragmentation_ratio:0.64
mem_fragmentation_bytes:-9944392
mem_not_counted_for_evict:0
mem_replication_backlog:0
mem_clients_slaves:0
mem_clients_normal:20496
mem_aof_buffer:0
mem_allocator:jemalloc-5.2.1
active_defrag_running:0
lazyfree_pending_objects:0
Using PHP redis to do Redis->del($key) etc.
I can’t use ordinary key to store the data (when del there is no leak).
Redis version 6.0.16