# Problema com Redis: "Exceção do trabalho: MISCONF Redis está configurado para salvar snapshots RDB..."

**URL:** https://meta.discourse.org/t/redis-trouble-job-exception-misconf-redis-is-configured-to-save-rdb-snapshots/219749
**Category:** Self-hosting
**Created:** [Março 1, 2022, 8:51pm UTC](https://meta.discourse.org/t/redis-trouble-job-exception-misconf-redis-is-configured-to-save-rdb-snapshots/219749 "2022-03-01T20:51:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mreach](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@mreach](https://meta.discourse.org/u/mreach)
#### Post date: [Março 1, 2022, 8:51pm UTC](https://meta.discourse.org/t/redis-trouble-job-exception-misconf-redis-is-configured-to-save-rdb-snapshots/219749/1 "2022-03-01T20:51:04Z")

</div>

Tenho tido um problema estranho desde a atualização do Discourse.

```plaintext
cd /var/discourse
./launcher enter app
cd /shared/log/rails
tail -f production.log

```

gera o seguinte ad infinitum:

```plaintext
Job exception: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
Error connecting to Redis on localhost:6379 (Redis::TimeoutError)

```

unicorn.stderr.log está cheio de:

```plaintext
E, [2022-03-01T20:45:20.703541 #65] ERROR -- : reaped #<Process::Status: pid 30842 exit 1> worker=unknown
Detected dead worker 30842, restarting...
Failed to report error: Error connecting to Redis on localhost:6379 (Redis::TimeoutError) 3 Job exception: Error connecting to Redis on localhost:6379 (Redis::TimeoutError)

MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:126:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis.rb:538:in `block in del'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis.rb:52:in `block in synchronize'
...

```

Claramente parece ser um problema com o Redis e suspeito que ele esteja sendo encerrado de alguma forma, mas não parece ser do log do kernel fora da imagem do docker, no entanto, dentro da imagem do docker, vejo:

```plaintext
$ df -h
Filesystem Size Used Avail Use% Mounted on
overlay 157G 53G 97G 36% /
tmpfs 64M 0 64M 0% /dev
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
shm 512M 0 512M 0% /dev/shm
/dev/sda 157G 53G 97G 36% /shared
tmpfs 3.9G 0 3.9G 0% /proc/acpi
tmpfs 3.9G 0 3.9G 0% /proc/scsi
tmpfs 3.9G 0 3.9G 0% /sys/firmware

```

```plaintext
$ free
               total used free shared buff/cache available
Mem: 8167420 3248628 794816 8596 4123976 4634504
Swap: 524284 268 524016

```

Não é ótimo, mas não parece horrível.

De volta ao sistema host, `htop` mostra:

 ![htop](https://global.discourse-cdn.com/meta/original/3X/6/3/634fed948a4dca43baf5c3ca3973a038d03a4d7e.jpeg)

Alguma ideia sobre os passos para depurar/resolver isso?
