redis-memory-analyzer icon indicating copy to clipboard operation
redis-memory-analyzer copied to clipboard

Unknown command 'CONFIG' and 'DEBUG'

Open fenelon opened this issue 8 years ago • 4 comments

I'm getting the following trace. Any thoughts on the fix?

Match *:  99%|################################################################################################################################################################  | 494131/500000 [00:08<00:00, 62306.83it/s]INFO:root:
Limit 500000 reached
Match *: 500001it [00:08, 58686.04it/s]

Aggregating keys by pattern and type

Apply rules
WARNING:rma.rule.GlobalKeySpace:*max* option skipped: ResponseError("unknown command 'CONFIG'",)
Processing String patterns:  24%|##################################7                                                                                                             | 119871/496878 [00:20<01:02, 6006.85it/s]WARNING:rma.rule.ValueString:ResponseError("unknown command 'DEBUG'",)
Processing Hash patterns:   0%|                                                                                                                                                                     | 0/73 [00:00<?, ?it/s]Traceback (most recent call last):
  File "/usr/local/bin/rma", line 9, in <module>
    load_entry_point('rma==0.1.14', 'console_scripts', 'rma')()
  File "/usr/local/lib/python3.4/dist-packages/rma/cli/rma_cli.py", line 92, in main
    app.run()
  File "/usr/local/lib/python3.4/dist-packages/rma/application.py", line 118, in run
    str_res += self.do_ram(keys)
  File "/usr/local/lib/python3.4/dist-packages/rma/application.py", line 153, in do_ram
    ret += (rule.analyze(keys=aggregate_patterns, total=total_keys))
  File "/usr/local/lib/python3.4/dist-packages/rma/rule/Hash.py", line 98, in analyze
    agg = HashAggregator(progress_iterator((HashStatEntry(x, self.redis) for x in data), progress), len(data))
  File "/usr/local/lib/python3.4/dist-packages/rma/rule/Hash.py", line 55, in __init__
    self.encoding = pref_encoding([obj.encoding for obj in g00], redis_encoding_id_to_str)
  File "/usr/local/lib/python3.4/dist-packages/rma/rule/Hash.py", line 55, in <listcomp>
    self.encoding = pref_encoding([obj.encoding for obj in g00], redis_encoding_id_to_str)
  File "/usr/local/lib/python3.4/dist-packages/rma/helpers/__init__.py", line 6, in progress_iterator
    for i in x:
  File "/usr/local/lib/python3.4/dist-packages/rma/rule/Hash.py", line 98, in <genexpr>
    agg = HashAggregator(progress_iterator((HashStatEntry(x, self.redis) for x in data), progress), len(data))
  File "/usr/local/lib/python3.4/dist-packages/rma/rule/Hash.py", line 43, in __init__
    self.fieldMin = min(args2)
ValueError: min() arg is an empty sequence

fenelon avatar Jun 24 '16 09:06 fenelon

Maybe this if you are using AWS ElastiCache:

For cache clusters running Redis, the following commands are unavailable:

  • bgrewriteaof
  • bgsave
  • config
  • debug
  • migrate
  • save
  • slaveof
  • shutdown

http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/ClientConfig.RestrictedCommands.html

pboling avatar Jul 14 '16 17:07 pboling

I actually am. I guess RMA needs a flag to work without those commands if it is possible altogether. Any ideas?

fenelon avatar Jul 14 '16 20:07 fenelon

@fenelon The INFO command may be the extent of what you can use. There is a redis-sampler tool that utilizes INFO, and it may provide some insight.

It definitely works on AWS ElastiCache (I use it, though not sure how easily it could be used for memory usage analysis).

https://github.com/antirez/redis-sampler

pboling avatar Jul 21 '16 10:07 pboling

What If I simply used rename-command to rename CONFIG and DEBUG to something safer? Is there any way to tell RMA to consider the new names?

adriano-di-giovanni avatar Oct 04 '18 12:10 adriano-di-giovanni