Queue mode: Redis maxmemory-policy?

Greetings.

What is the recommended maxmemory-policy to use in Redis when using Queue Mode?

I would go with noeviction, to ensure no message is lost due to a full Redis, but I don’t know if n8n implement a queuing mechanism that takes care of clearing the completed/failed messages, missing that allkeys-lru would be needed (even if risky).

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Marco_Matarazzo,

Welcome to the community :cake:

We don’t have a recommendation that I am aware of for that, @krynble any thoughts on this one?

@Jon,

thanks for the answer.

From a devops POV, it’s something that should be assessed, as it’s not a trivial point, it may easily lead to issues if overlooked.

The main criteria to choose is: does n8n clear the completed/failed messages? Assuming it uses BullMQ (I may be wrong, I’m inferring it from the variable names), I don’t know if auto-removal of jobs is in place.

If jobs entries are properly removed, noeviction is very likely the proper way to proceed. Otherwise, to avoid filling up Redis, we should go for allkeys-lru, knowing that we MAY lose jobs if a key gets evicted before the processing ends.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.