Redis 的 DEBUG SEGFAULT 命令用于执行一个不合法的内存访问从而让 Redis 崩溃,仅在开发时用于 BUG 模拟。
192.168.98.70:6379> DEBUG SEGFAULT
无。
O(1)
>= 1.0.0
使用 DEBUG SEGFAULT 让 redis 崩溃
127.0.0.1:6379> DEBUG SEGFAULT Could not connect to Redis at 127.0.0.1:6379: Connection refused not connected> PING Could not connect to Redis at 127.0.0.1:6379: Connection refused
我们使用了 DEBUG SEGFAULT 命令让 redis 崩溃了,接着,再次使用 PING 命令,测试服务器的连接性,返回了错误。
Redis 的 DEBUG SEGFAULT 命令用于执行一个不合法的内存访问从而让 Redis 崩溃,仅在开发时用于 BUG 模拟。