PostgreSQL connection validated, but n8n falls back to SQLite in queue mode

Hi @Fabio_Gomes_dos_Sant

You’re seeing the message about SQLite because n8n is falling back to it. This usually happens when not all required DB environment variables are available in the n8n process.

Even if your PostgreSQL connection works in a custom script, n8n runs as separate pods in queue mode—webhook and worker—and both need the full set of DB config variables. If either pod is missing something like DB_TYPE or DB_POSTGRESDB_HOST, n8n will silently default to SQLite.

Check that both webhook and worker have the following env vars set:

DB_TYPE=postgresdb
DB_POSTGRESDB_HOST=10.105.145.7
DB_POSTGRESDB_PORT=5432
DB_POSTGRESDB_USER=n8n
DB_POSTGRESDB_PASSWORD=MYHsdasaddVqcFdfi8
DB_POSTGRESDB_DATABASE=n8n

In the 8gears Helm chart, you need to use webhook.extraEnv and worker.extraEnv to pass these to both pods. Setting them only at a global level may not apply them correctly to each container.

After updating, check the logs. You should see “Started with DB type: postgresdb”. If you still see a warning about SQLite or find database.sqlite inside the pod, the fallback is still happening.

Let me know if you want help editing your Helm values file.

I hope this helps.

1 Like