0

I use Jedis in Storm Bolt to insert record to Redis. But Redis suddenly flushall my data serveral times.

The first time I checked number of records it showed 23k but after that I rechecked it shows only over 100 records, and the last time I checked it just had 60 records, and that was the newest one.

So I consider that why my old records had been flushed?

Nhiên Ngô Đình
  • 544
  • 2
  • 6
  • 16
  • Is your Redis password protected? If not, there is a chance someone from outside connects to it and flushes – Itamar Haber Mar 03 '20 at 10:46
  • I didn't enable password protected, but I didn't public my Redis as well. So that's no possible – Nhiên Ngô Đình Mar 03 '20 at 12:18
  • 1
    Keys are either expired (if they have a TTL), evicted (if configured as a cache) or flushed/deleted. For tracking the last possibility you can use `MONITOR`. – Itamar Haber Mar 03 '20 at 13:12
  • I checked TTL with command TTL mykey and it returned -1, it means key's expiration are not set right?. Moreover, my data comes in huge amount so I can't use monitor to check where these error – Nhiên Ngô Đình Mar 04 '20 at 04:25

1 Answers1

0

My problem is using bitnami/redis, it has a hidden configuration or it's just broken that makes it flushall data automatically.

I change to docker official image redis and it works totally fine.

Nhiên Ngô Đình
  • 544
  • 2
  • 6
  • 16