You can set the #no_loose_disabled-commands parameter in the console to disable certain commands that may degrade service performance and cause data loss.


Unlimited usage of commands may cause some issues in certain scenarios. Some Redis commands can delete most of or all data in a database, such as FLUSHALL and FLUSHDB. Improper uses of some commands such as KEYS and HGETALL cause process blocking in the single-threading Redis model and reduce service performance. To ensure stable and efficient management, you can disable these types of commands to minimize risks in your workloads.

Set the parameter in the ApsaraDB for Redis console

  1. Log on to the ApsaraDB for Redis console.
  2. On the top of the page, select the region where the instance is located.
  3. In the left-side navigation pane, click Instance List to go to the Instance List page. Find the instance that you want to manage, and click the instance ID, or click the More icon and select Manage in the Action column for the instance.
  4. The Instance Information page is displayed by default. In the left-side navigation pane, click System Parameters.
  5. On the System Parameters page, find the #no_loose_disabled-commands parameter and click Modify in the Action column for the parameter.
    Figure 1. Disable specific Redis commands by setting the system parameter
    Disable specific Redis commands
  6. In the dialog box that appears, specify the commands to be disabled and click OK.
    Figure 2. Specify the Redis commands to be disabled
    Specify the Redis commands to be disabled
    • The parameter value can only contain lowercase letters. Separate multiple commands with commas (,).
    • Commands that can be disabled include FLUSHALL, FLUSHDB, KEYS, HGETALL, EVAL, EVALSHA, and SCRIPT.

Call API operations to set parameters

You can also call the ModifyInstanceConfig operation to set parameters.