Extreme postgres usage

In the screenshot, you can see that Postgres is being used a lot. I’m using n8n in Docker with 150 workers, and they’re all busy. When I started a big task, I noticed that the Postgres usage was really high. That’s not usual.

30 minutes later, the task is done and here’s how Postgres is working now:

n8n automatically deletes the execution data after a set time. Do I need to make any special configurations for using Postgres?

Hey @Benedikt_Bohm,

What is the big task doing? What version of n8n are you running as well? With 150 workers have you also done any database tuning at all or are you using the default Postgres configuration?

Hey @Jon
im just using the default settings in postgres, setup with plesk.
n8n is running the version 1.1.0

The big task ist permanently starting 100 subtasks in parallel.
It checks in the n8n database if 100 workflows are running right now when not it starting new jobs.

Hey @Benedikt_Bohm,

If you are starting 100 in parallel that would explain it, I would recommend looking at what database tuning you can do based on your resources and environment. As a starting point you can look at this: https://pgtune.leopard.in.ua/ but I would recommend checking the Postgres documentation to see what you can do as well.

okay did made the changes, postgres is running again. now n8n wont start:

2023-08-11T10:39:45.404Z | error    | Last session crashed "{ file: 'CrashJournal.js', function: 'init' }"
2023-08-11T10:39:55.511Z | debug    | Lazy Loading credentials and nodes from n8n-nodes-base "{\n  credentials: 320,\n  nodes: 431,\n  file: 'DirectoryLoader.js',\n  function: 'loadAll'\n}"
2023-08-11T10:39:58.966Z | error    | Last session crashed "{ file: 'CrashJournal.js', function: 'init' }"
2023-08-11T10:40:09.100Z | debug    | Lazy Loading credentials and nodes from n8n-nodes-base "{\n  credentials: 320,\n  nodes: 431,\n  file: 'DirectoryLoader.js',\n  function: 'loadAll'\n}"
2023-08-11T10:40:12.534Z | error    | Last session crashed "{ file: 'CrashJournal.js', function: 'init' }"

It was a error with postgres in the new config. need to check that

1 Like

Seems to work great, thank you!
now im facing a new issuse :smiley:


no workflow is actually running but in the database there are many in status running.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.