FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
31.52k stars 16.42k forks source link

[BUG] Redis-Backed Chat Memory - Error: Connection is closed #2047

Open ViniciusNoma opened 7 months ago

ViniciusNoma commented 7 months ago

Describe the bug I recently set up a workflow using OpenAI Function Agent with Redis-Backed Chat Memory. However, I noticed that sometimes when I save the project and go to another similar project also using Redis-Backed Chat Memory (with different connect credential) and try to interact with the chat, it generates the following error: Chain run errored with error: "Connection is closed.\n\nError: Connection is closed.\n at EventEmitter.sendCommand".

It looks like the problem is with query param in the redis URL. Example: redis://localhost:6379?keyPrefix=something

To Reproduce Steps to reproduce the behavior:

  1. Create two projects with Redis-Backed Chat Memory
  2. Setup local Redis
  3. Interact with the chat
  4. See error

Screenshots

Captura de Tela 2024-03-26 às 11 41 42

Setup

HenryHengZJ commented 7 months ago

It looks like it cant reach the Redis server instance, have you tried to see if you can successfully establish connection to the Redis outside of Flowise?

ViniciusNoma commented 7 months ago

@HenryHengZJ Yes, it is working outside of Flowise. I forgot to mention that I also tried connecting to local Redis without adding query parameters, and it worked.

I believe the problem lies with the memory node instance. I attempted to debug it, and when I save the project containing the Redis-Backed Chat Memory and switch to another project with the same node (both using the same connection), an error message appears: 'Connection is closed. Error: Connection is closed. at EventEmitter.sendCommand'.