As n8n converts everything into JSON (and so key → value pairs) will the memory required be much higher than in SQLite.
You can do one of two things:
- Increase RAM
- Depending on your workflows and what you are doing you could split up the workflow into two different ones to decrease the memory footprint. One outer one that does not have much data and for example only loops and gives start-index to another sub-workflow which then does the rest of the work.