Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possível problema com cache Redis #1187

Open
1 task done
raphaelc0elh0 opened this issue Jan 31, 2025 · 5 comments
Open
1 task done

Possível problema com cache Redis #1187

raphaelc0elh0 opened this issue Jan 31, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@raphaelc0elh0
Copy link

raphaelc0elh0 commented Jan 31, 2025

Welcome!

  • Yes, I have searched for similar issues on GitHub and found none.

What did you do?

  1. Enviei mensagem de teste para um grupo utilizando o endpoint: {{baseUrl}}/message/sendText/{{instance}}

  2. A mensagem chega normalmente, porém, já analisando os logs da api, recebo a seguinte mensagem em looping infinito:

Cache request for group: <id do grupo>
Cache request for group: <id do grupo>
Cache request for group: <id do grupo>
...

  1. Excluo a mensagem utilizando o aplicativo do Whatsapp padrão (sem ser o business) na opção excluir para todos.

  2. A mensagem é deletada, mas logo em seguinda a API reenvia a mensagem.

  3. Testei um outro admin deletando a mensagem, mas o mesmo comportamento ocorre.

What did you expect?

  1. Esperava que não houvesse houvesse problemas de cache ("Cache requested for group")
  2. Esperava que ao deletar a mensagem do grupo, não fosse reenviada.

What did you observe instead of what you expected?

Mensagem reenviada ao deletar a mensagem do grupo

Screenshots/Videos

Image

Which version of the API are you using?

Docker usando a imagem: atendai/evolution-api:v2.1.1

What is your environment?

Docker

Other environment specifications

No response

If applicable, paste the log output

Log do inicio da aplicação, provando que o Redis foi inicializado corretamente:

[Evolution API]    v2.1.1  162   -  Fri Jan 31 2025 12:28:01     VERBOSE   [Prisma]  [string]  connecting
[Evolution API]    v2.1.1  162   -  Fri Jan 31 2025 12:28:01     VERBOSE   [CacheEngine]  [string]  RedisCache initialized for groups
[Evolution API]    v2.1.1  162   -  Fri Jan 31 2025 12:28:01     VERBOSE   [CacheService]  [string]  cacheservice created using cache engine: Vt
[Evolution API]    v2.1.1  162   -  Fri Jan 31 2025 12:28:01     VERBOSE   [CacheEngine]  [string]  RedisCache initialized for instance
[Evolution API]    v2.1.1  162   -  Fri Jan 31 2025 12:28:01     VERBOSE   [CacheService]  [string]  cacheservice created using cache engine: Vt
[Evolution API]    v2.1.1  162   -  Fri Jan 31 2025 12:28:01     VERBOSE   [CacheEngine]  [string]  RedisCache initialized for baileys
[Evolution API]    v2.1.1  162   -  Fri Jan 31 2025 12:28:01     VERBOSE   [CacheService]  [string]  cacheservice created using cache engine: Vt
[Evolution API]    v2.1.1  162   -  Fri Jan 31 2025 12:28:01     INFO   [WA MODULE]  [string]  Module - ON
[Evolution API]    v2.1.1  162   -  Fri Jan 31 2025 12:28:02     VERBOSE   [Redis]  [string]  redis connecting
[Evolution API]    v2.1.1  162   -  Fri Jan 31 2025 12:28:02     VERBOSE   [Redis]  [string]  redis ready
[Evolution API]    v2.1.1  162   -  Fri Jan 31 2025 12:28:03     INFO   [PrismaRepository]  [string]  Repository:Prisma - ON
[Evolution API]    v2.1.1  162   -  Fri Jan 31 2025 12:28:03     LOG   [SERVER]  [string]  HTTP - ON: 3000

Log da api com os erros de request:
Image

Additional Notes

No response

@raphaelc0elh0 raphaelc0elh0 added the bug Something isn't working label Jan 31, 2025
@alessandrovarela
Copy link

Eu acabei de atualizar para a 2.2.2 e estou com o mesmo problema aqui. No log, uma acumulo de mensagens:

2025-02-01T03:26:17.843946457Z Cache request for group:

2025-02-01T03:26:17.994496407Z Cache request for group:

2025-02-01T03:26:18.100535066Z Cache request for group:

2025-02-01T03:26:18.190521960Z Cache request for group:

2025-02-01T03:26:18.331386976Z Cache request for group:

2025-02-01T03:26:18.534175312Z Cache request for group:

@dougpess
Copy link

dougpess commented Feb 2, 2025

Mesmo problema aqui [evolution-api:v2.2.2]:[redis:7-alpine]:[postgres:16-alpine]

Image

@LenoSeibert
Copy link

LenoSeibert commented Feb 3, 2025

Mesmo problema aqui. Exclui a o numero da evolution e criei novamente mas não resolveu.

ATT: Sai dos grupos que estavam dando o erro e entrei novamente e o erro parou.

@pedroepif
Copy link

pedroepif commented Feb 3, 2025

Basta remover a KEY do redis que volta a funcionar corretamente, você pode fazer via CLI. Vai ser a CACHE_REDIS_PREFIX_KEY que informou no .env <CACHE_REDIS_PREFIX_KEY>:groups:<group_id>. So usar o comando DEL <CACHE_REDIS_PREFIX_KEY>:groups:<group_id> do redis-cli. Ou desativar o REDIS.

@dennismartini
Copy link

Basta remover a KEY do redis que volta a funcionar corretamente, você pode fazer via CLI. Vai ser a CACHE_REDIS_PREFIX_KEY que informou no .env <CACHE_REDIS_PREFIX_KEY>:groups:<group_id>. So usar o comando DEL <CACHE_REDIS_PREFIX_KEY>:groups:<group_id> do redis-cli. Ou desativar o REDIS.

Eu desativei o Redis e deu certo, pouco fluxo, não vou precisar, valeu!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants