Hey guys, I’m another who is self-hosting n8n in a docker compose setup. I have a VPS only running n8n, with 4 CPU cores and 8 gigs of RAM, NVME SSD. Ubuntu 20.04 x64. Still I’m running into performance issues specifically on a workflow that only has about 28 nodes.
The UI lags, stutters and my browser window ultimately crashes when I try to open some of the nodes or do anything significant. I truly love n8n and want to keep using it to build my project, but I’m feeling it may not be very scalable right now? Hopefully I’m wrong. Does anyone have ideas on how to address it?
Very sorry to hear that you have problems. That sounds like a very bad experience. I wanted to check if that is something that now changed for you in the latest version or if it was already like that before?
I can’t really say that it was better in previous versions. I mean, it was, but my particular workflow has grown in complexity over the last few updates, so it seems likely that that is the culprit, rather than your update.
I tried to paste the workflow here, but it crashes the and/or throws a 502 when I try. Again, it’s only 28 nodes.
I was having multiple UI issues prior to upgrading to 0.220.0, but since we have I feel like the UI is very stable. Our server has similar specs to what yours does @lhyphendixon but we are on node instead of Docker
Hmm, thanks for the reply @jhambach. I want to keep pushing forward with this, and perhaps I need to scrap the docker setup and go for node, I just need to make sure I’m not barking up the wrong tree. I’m basically trying to use n8n as the ‘brain’ for a chatbot that could eventually be interacted with by hundreds of people simultaneously but I’m now wondering if it’s an appropriate tool for the job with the performance issues I’m having.
I’m having glitches too.
I have Digital Ocean. 4gb 2cpu [0.221.2]
1-5 applies to the current version (and to 222.0 too)
When running the script, the script completes, but in the browser as if it spins on the last node endlessly. As a result, the script can be stopped manually if only.
Error - Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'isArtificalRecoveredEventItem')
at s.pushMessageReceived (/assets/index-24052367.js:21:222611)
Today I noticed in Split In Batches node, if I check Options-Reset and return the information as usual, memory overflow and server hangs. Maybe I’m doing the wrong thing but I would put a check on the current check when reset option is enabled to check for repeating data, if fully repeated, then abort.
Page after crash hangs , if I press refresh page in current tab does not react , opens only by opening a new tab .
If I stop during script execution from page executions running script. The server throws a 502 error and n8n restarts restores.
When viewing the script, when I go into Execution in it on the visual to identify an error, when I load the page appears spinning wheel, but in the process of loading and memory overflow occurs (I have PC 32gb) memory overflow, the script is not displayed, tab out of memory
I attach the log from the devtools Performance tab
From performance tab
Earlier:
6. 222.0 Last month on a 4gb server, when running one of the big scripts, the memory fill comes up to 2gb, the server crashes. Here is a small text from the server log.
log from 222.0
<--- Last few GCs --->
[6:0x7f01ea0923f0] 1395136 ms: Mark-sweep (reduce) 1960.1 (2004.1) -> 1958.8 (1999.9) MB, 811.6 / 0.1 ms (+ 223.3 ms in 47 steps since start of marking, biggest step 14.8 ms, walltime since start of marking 1062 ms) (average mu = 0. 271, current mu = 0.1[6:0x7f01ea0923f0] 1396084 ms: Mark-sweep (reduce) 1959.7 (1999.9) -> 1958.1 (2000.1) MB, 946.7 / 0.1 ms (average mu = 0.159, current mu = 0.001) allocation failure scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
2023-03-22T13:50:31.621Z error | Last session crashed "{ file: 'CrashJournal.js', function: 'init' }"
2023-03-22T13:50:41.718Z | debug | Lazy Loading credentials and nodes from n8n-nodes-base "{\n credentials: 311,{n nodes: 395,{n file: DirectoryLoader.js,{n function: 'loadAll'{n}"
This particular error was caused by the Code module with complex sorting.
Honestly, should there be absolutely no difference between “Docker” and “node”. After all, is it 100% the same as n8n also simply runs always with Node.js, just one time directly and one time inside of Docker. It should only make a difference if the Docker config is wrong or limits have been put in place. Generally would ALWAYS recommend running n8n with Docker.
Do you process a lot of data or items with your workflow? Do you additionally also use a lot of binary data?