FLUSHDB is sync by default, meaning it will delete keys one by one before returning. Try ASYNC option https://redis.io/docs/latest/commands/flushdb/ Starting with Redis version 4.0.0: Added the ASYNC flushing mode modifier