I run n8n in Kubernetes, with 3 deployments (main, webhook, and workers).
The main process starting up is failing now that I am testing out the latest image.
I was using 0.x versions with MariaDB and all was okay.
The startup seems to start okay, it connects to the DB, creates the schema etc, created entries in redis, but then at one point I get an error (shared below)
What is the error message (if any)?
Stopping n8n...
Error: There was an error shutting down n8n.
TypeError: Cannot read properties of undefined (reading 'removeAllQueuedWorkflowActivations')
I have tried quite a lot of debugging, but not sure what is causing this… The databases are clean with no entries, so there shouldn’t be anything to ‘remove’
Information on your n8n setup
n8n version: 1.6.1
Database (default: SQLite): PostgreSQL 15.4
n8n EXECUTIONS_PROCESS setting (default: own, main): main - queue mode
I enabeled the DB logging and reduced overall logging to DEBUG level, and it seems the migrations are not completing correctly
Question: What is the supported version of PostgreSQL and what permissions should the n8n db user have?
(To be fair I tried giving it superuser as well, still the same error)
The logs:
UserSettings were generated and saved to: /home/node/.n8n/config
2023-09-12T15:16:35.520Z | debug | Lazy Loading credentials and nodes from n8n-nodes-base "{\n credentials: 346,\n nodes: 436,\n file: 'DirectoryLoader.js',\n function: 'loadAll'\n}"
query: SELECT * FROM current_schema()
query: CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
query: SELECT version();
query: CREATE SCHEMA IF NOT EXISTS n8n
query: SET search_path TO n8n,public;
query: SELECT 1
query: SELECT 1
query: SELECT 1
query: SELECT 1
query: SELECT 1
(and repeating like this forever basically...)
I am not sure which versions we support but I have seen versions 12 to 15 work without issue. The n8n db user would need the usual set of permissions to manage the database but it doesn’t look like that is the issue.
Can you share your configuration so we can take a look? For now it may be worth trying with a single n8n instance pointing to the database if that works then add the workers and set it to queue mode to see how that goes.
I just tried switching to regular execution mode from queue, removed the redis dependency, other workers/ webhooks and still the ‘SELECT 1’ loop is the same.