Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis - Loading Dataset is Memory Sport:

We are using Redis for Windows and ServiceStack as client library. We are getting the following memory issue from the Redis storage. It was able recover immediately but still this issue is causing some unexpected behaviour in the application .

like image 590
satish Avatar asked Dec 17 '14 17:12

satish


People also ask

How much memory is Redis using?

An empty instance uses ~ 3MB of memory. 1 Million small Keys -> String Value pairs use ~ 85MB of memory. 1 Million Keys -> Hash value, representing an object with 5 fields, use ~ 160 MB of memory.

How do I fix loading Redis is loading the dataset in memory?

Flush Redis Cache To Flush the Redis Cache, either the FLUSHDB or the FLUSHALL commands could be used. FLUSHDB command deletes all the keys of the DBs selected and the FLUSHALL command deletes all the keys of all the existing databases, not just the selected one. This will help to fix the issue.


1 Answers

Loading dataset error message happens in two cases:

  1. At master startup.
  2. When a slave reconnects and performs a full resynchronization with a master.

The app should be able to deal with it, and retry a query or handle the failure in a graceful way.

like image 191
antirez Avatar answered Oct 05 '22 19:10

antirez