To disable specific commands that may degrade service performance and cause data loss, you can set the #no_loose_disabled-commands parameter in the console.
In certain scenarios, unlimited usage of commands may cause some issues. Some Redis commands can delete a large volume of data or all data in a database, such as flushall and flushdb. Improper uses of some commands such as keys and hgetall may cause blocking in the single-threading Redis model and degrade service performance.
To ensure stable and efficient management, you can disable these commands to minimize risks in your workloads.
Modify the parameter in the ApsaraDB for Redis console
- Log on to the ApsaraDB for Redis console.
- In the top navigation bar of the page, select the region where the instance is deployed.
- On the Instances page, click the ID of the instance.
- In the left-side navigation pane, click System Parameters.
- On the System Parameters page, find the #no_loose_disabled-commands parameter and click Modify in the Actions column.
- In the dialog box that appears, specify the commands to be disabled.
Note The parameter value can contain only lowercase letters. Separate multiple commands with commas (,). For example, keys,flushall.
- Click OK.
(error) ERR command 'FLUSHALL' not support for normal user.