Slow editor, killed containers and workflows that never finish usually come from a few causes. Here is how to find and fix them.
Most n8n performance problems fall into three groups: running out of memory, a database that has grown too large, and workflows that process too much data at once. Fix them in this order.
docker stats
docker compose logs --tail 200 n8n
docker inspect n8n --format '{{.State.OOMKilled}}'
If the last command shows true, the container was killed for using too much memory. If the CPU is high all the time, look at the Code node and parallel workflows.
A main workflow can call a sub-workflow for each batch. Memory used by the sub-workflow is freed when it finishes, so peak memory stays lower. Smaller workflows are also easier to debug.
EXECUTIONS_DATA_PRUNE=true
EXECUTIONS_DATA_MAX_AGE=168
EXECUTIONS_DATA_SAVE_ON_SUCCESS=none
These settings can differ by version. Check the n8n documentation for the one you run.
The server needs the RAM first. Adding a Node memory option does not help if the machine has none to spare. After you upgrade the VPS, you can raise the Node heap limit if needed, for example with the NODE_OPTIONS=--max-old-space-size=3072 setting on a 4 GB server. Leave room for the OS and the database.
SSD or NVMe storage and Postgres make the editor and executions feel much faster than SQLite on a slow disk. See the sizing table in n8n self-hosting requirements.
When one process is simply too busy, move to queue mode with workers, as explained in n8n queue mode explained. Or upgrade to a larger VPS. See which VPS plan fits which n8n workload.
Need more RAM or a tuned setup? Compare our Linux VPS plans or ask us for advice.
View Linux VPS Plans