n8n w/worker template
emircanerkul
FREEOP

2 months ago

I used template, then switched region to EU, all variables looks good but worker can not connect it.

There was an error initializing DB

Could not establish database connection within the configured timeout of 40 ms. Please ensure the database is configured correctly and the server is reachable. You can increase the timeout by setting the 'DB_POSTGRESDB_CONNECTION_TIMEOUT' environment variable.

some logs from postgresql

2026-01-13 17:01:26.480 UTC [3] LOG:  starting PostgreSQL 16.11 (Debian 16.11-1.pgdg13+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
2026-01-13 17:01:26.480 UTC [3] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2026-01-13 17:01:26.480 UTC [3] LOG:  listening on IPv6 address "::", port 5432
2026-01-13 17:01:26.490 UTC [3] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2026-01-13 17:01:26.508 UTC [26] LOG:  database system was interrupted; last known up at 2026-01-13 16:57:12 UTC
2026-01-13 17:01:27.018 UTC [26] LOG:  database system was not properly shut down; automatic recovery in progress
2026-01-13 17:01:27.030 UTC [26] LOG:  redo starts at 0/1D300D8
2026-01-13 17:01:27.032 UTC [26] LOG:  invalid record length at 0/1D347E0: expected at least 24, got 0
2026-01-13 17:01:27.032 UTC [26] LOG:  redo done at 0/1D347A8 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
2026-01-13 17:01:27.050 UTC [24] LOG:  checkpoint starting: end-of-recovery immediate wait
2026-01-13 17:01:27.103 UTC [24] LOG:  checkpoint complete: wrote 13 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.012 s, sync=0.018 s, total=0.061 s; sync files=12, longest=0.013 s, average=0.002 s; distance=17 kB, estimate=17 kB; lsn=0/1D347E0, redo lsn=0/1D347E0
2026-01-13 17:01:27.134 UTC [3] LOG:  database system is ready to accept connections
2026-01-13 17:06:27.200 UTC [24] LOG:  checkpoint starting: time
2026-01-13 17:06:27.752 UTC [24] LOG:  checkpoint complete: wrote 5 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.503 s, sync=0.019 s, total=0.552 s; sync files=5, longest=0.019 s, average=0.004 s; distance=6 kB, estimate=16 kB; lsn=0/1D362A0, redo lsn=0/1D36268
2026-01-13 17:11:27.846 UTC [24] LOG:  checkpoint starting: time
2026-01-13 17:11:28.142 UTC [24] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.208 s, sync=0.032 s, total=0.297 s; sync files=1, longest=0.032 s, average=0.032 s; distance=6 kB, estimate=15 kB; lsn=0/1D37B08, redo lsn=0/1D37AD0
Solved$10 Bounty

6 Replies

2 months ago

Hey, is the connection issue only related to the worker? If you (such as via the Database tab of your Postgres service) or your other services (such as the primary n8n service) can access it without any issue, then I would try to redeploy the worker again.


emircanerkul
FREEOP

2 months ago

Yes it is worker only related. Also observed, cloudflare dns having websocket issue, generated domain is not but worker do not work


emircanerkul
FREEOP

2 months ago

Just wondering if there are any limitation on free/trial plan


emircanerkul
FREEOP

2 months ago

Okay new deployment worked. Maybe things happened when i move region. But still even i redirect and able to use my custom (sub domain) it having websocket connection issue and in panel says Record not yet detected, even it detect and i can see.


emircanerkul

Okay new deployment worked. Maybe things happened when i move region. But still even i redirect and able to use my custom (sub domain) it having websocket connection issue and in panel says Record not yet detected, even it detect and i can see.

2 months ago

Hey, can you elaborate on the record not yet detected part? Please also include screenshots of your dashboard regarding this particular problem.


emircanerkul
FREEOP

2 months ago

It poped once, cant find. But i see my domain redirected but websockets are not working. So n8n is not usable. I see cors issues there, set 2 n8n variable both worker/main containers but didnt worked. Also tried migration which again caused issue. Also checking costs per day running only one simple health check 5m scheduled workflow and its around 0.5$ and seems expensive for me just for almost idle workload. But good ui though even migrations not work good. But I expect most downloaded template should not have such issues.

Anyway still looks good for vaultwarden self hosting.

Btw, you could close it i'm lack of interest now. I saw some dns proxy solution but not much time..


Status changed to Open brody about 2 months ago


Status changed to Solved brody about 2 months ago


Loading...