How to do it...

The steps for troubleshooting crash issues are as follows:

  1. Simulate the crash using the DEBUG SEGFAULT command:
$ bin/redis-cli DEBUG SEGFAULT
Error: Server closed the connection
  1. Check the log of the Redis instance after it crashes:
=== REDIS BUG REPORT START: Cut & paste starting from here ===
1710:M 07 Jan 20:58:01.324 # Redis 4.0.1 crashed by signal: 11
1710:M 07 Jan 20:58:01.324 # Crashed running the instruction at: 0x469cd0
1710:M 07 Jan 20:58:01.324 # Accessing address: 0xffffffffffffffff
1710:M 07 Jan 20:58:01.324 # Failed assertion: <no assertion failed> (<no file>:0)
    
------ STACK TRACE ------
EIP:
bin/redis-server 0.0.0.0:6379(debugCommand+0x250)[0x469cd0]
    
Backtrace:
bin/redis-server 0.0.0.0:6379(logStackTrace+0x45)[0x46ab25] ...

Get Redis 4.x Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.