Hi everyone,
I’m running a self-hosted n8n instance on a Hostinger VPS (Ubuntu 24.04) and I’m experiencing frequent issues where the server becomes temporarily unresponsive during workflow execution.
Sometimes the workflow stops and I receive either:
-
“502 Bad Gateway”
-
“Request failed with status code 502”
-
or the n8n editor becomes unresponsive for a short time
After a while it usually works again, but it happens quite regularly.
Server setup:
-
Hostinger VPS
-
Ubuntu 24.04
-
n8n self-hosted
-
Running via Docker
-
4 vCPU
-
~8 GB RAM
-
200 GB disk
According to the server monitoring:
-
CPU usage usually stays around 3–15%
-
RAM usage around 1–4 GB
-
Disk and bandwidth are far from limits
So it doesn’t seem like the server is overloaded.
The issue tends to appear when workflows process larger numbers of items.
My questions:
-
What is the most common cause of these 502 / Bad Gateway errors with self-hosted n8n?
-
Could this be related to reverse proxy timeouts or Docker configuration?
-
Could it be caused by large responses in the editor?
-
Does the database type matter here (MySQL vs PostgreSQL vs SQLite)?
-
Are there recommended production settings to make n8n more stable?
Would appreciate any guidance on what to check or optimize.
Thanks a lot!