N8N SERVER 502 Error Gateway

It depends on the exact data structure. But in general n8n does not have built-in logic to break down larger amounts of data during the workflow execution, so you’d need to handle this in your workflow. An example approach would be this one, where the parent workflow only processes very little data (essentially managing pagination) and the sub-workflow does the heavy lifting for smaller amounts of data.

Could you show how to manage Redis in n8n? I have created the service, but I am unsure if it is functioning as intended.

I believe Redis is not the problem here. It’s only needed to hand over production executions from the main n8n instance to the worker once you deploy one and fully switch to queue mode. You would configure the connection using the QUEUE_BULL_REDIS_HOST and QUEUE_BULL_REDIS_PORT environment variables in your n8n configuration as documented here.

But perhaps you want to consider a single instance setup for now to avoid the additional complexity coming with queue mode?