How it works...

Before we dive into how to troubleshoot the memory issue, we first pay attention to how Redis calculates memory and checks if there are any out-of-memory (OOM) problems.

Generally speaking, the memory of a Redis instance includes the following parts:

We won't go into the details of each part of the preceding diagram, as you can find their meanings in the recipes of the previous chapters. For Redis version 4.0.1, one portion of memory that desires your considerable attention is the client query buffer. The metric used_memory includes this portion of memory, however, it may be extended as the client query buffer grows. Thus, ...

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.