Troubleshooting 100% CPU Usage of a DCS Redis Instance
Symptom
The CPU usage of a Redis instance spikes to 100% within a short period of time.
Fault Locating
- Check the monitoring data generated during the period when the problem occurred.

Redis is single-threaded. If CPU usage suddenly surges at a specific point in time, an operation may have blocked the thread. In this case, check whether the slow log exists.
- Go to the Performance Monitoring page of the instance and check Slow Query Logs metric.
If the slow log exists, check the slow log.
- Go to the Slow Log page of the instance and check the slow log generated during the specified period.

The KEYS command may have caused the slow log. Running the KEYS command will initiate the search for all keys that meet the conditions, which occupies an excessive amount of CPU resources and may deteriorate performance. Instead, you can run the SCAN command or disable the KEYS command.
Last Article: Troubleshooting Redis Connection Exceptions
Next Article: Troubleshooting a Jedis Connection Pool Error
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.