All Products
Search
Document Center

Tair (Redis® OSS-Compatible):Disable high-risk commands

Last Updated:Mar 28, 2026

Use the #no_loose_disabled-commands parameter to block specific Redis commands that could cause data loss or degrade instance performance.

Some Redis commands carry inherent risks in production environments:

  • Data deletion commands — FLUSHALL and FLUSHDB clear most or all data in an instance.

  • Blocking commands — KEYS and HGETALL can block the instance and degrade performance when run against large datasets.

Disabling these commands at the instance level prevents accidental or unauthorized execution.

To ensure stable instance performance, Tair (Redis OSS-compatible) does not allow commands such as CONFIG to be disabled. For more information, see Commands that cannot be disabled.

Disable commands

  1. Log on to the Alibaba Cloud console and go to the Instances page. In the top navigation bar, select the region where your instance resides. Find your instance and click its ID.

  2. In the left-side navigation pane, click Parameter Settings.

  3. On the System Parameters tab, find #no_loose_disabled-commands and click Modify in the Actions column.

  4. In the dialog box, enter the commands to disable. Use the following format:

    • Use only lowercase letters

    • Separate multiple commands with commas (,)

    • Example: keys,flushdb

    Important

    Disabling a parent command also disables all its subcommands. For example, disabling script blocks SCRIPT EXISTS, SCRIPT LOAD, and all other SCRIPT subcommands. Subcommands cannot be disabled individually.

  5. Click OK.

Verify the change

Connect to your instance using redis-cli and run a disabled command. For example, running FLUSHALL returns one of the following errors:

ERR command 'FLUSHALL' not support for normal user
NOPERM this user has no permissions to run the 'flushall' command

Commands that cannot be disabled

The following commands are reserved for internal operations and cannot be disabled:

  • CONFIG

  • MIGRATE

  • RESTORE-ASKING

  • LASTSAVE

  • BGREWRITEAOF

  • REPLICAOF

  • BGSAVE

  • PFDEBUG

  • PFSELFTEST

  • SLAVEOF

  • ACL-related commands

  • MODULE-related commands

  • DEBUG-related commands

API reference

API operationDescription
DescribeParametersQueries the configuration and operational parameters of an instance
ModifyInstanceConfigModifies the parameter settings of an instance