Postgres over SSH Tunnel Hangs in n8n

Postgres node hangs indefinitely after the shared SSH client is closed — a recent regression in n8n where the tunnel lifecycle outlives the client. Queue mode makes it worse.

Owned guide · portfolio demonstration, not client work · No guaranteed outcome claimed. Publicly observed Fiverr starting price is $15 and may change.

Root cause (tracked) GitHub issue 40113: Postgres node over SSH tunnel hangs after the shared SSH client is closed. Workaround is keepalive or bypassing the shared client. github.com/n8n-io/n8n/issues/40113

1. Repro

2. Workarounds that unblock now

3. What not to do

4. Verify the fix

Kill the SSH client, run the workflow again. With a healthy tunnel the query returns in <2s; with the bug it hangs past 15s and the statement timeout fires.

If you run this on the hosted VPS here, note that Postgres and the SSH tunnel are reached via loopback health at 127.0.0.1:5055/health (bank) and 127.0.0.1:5678/healthz (n8n) — public /api/bank-webhook stays 404 by design so the tunnel never leaks.

Grab the free diagnostic checklist — no email wall

Copy this pre-filled request, paste it wherever you asked for help, and you will get a targeted answer without sharing secrets. Nothing is tracked on this page.

Subject: n8n postgres ssh — diagnostic request

Describe:
- Webhook or HTTP Request node + method/path
- Test URL works? Production URL status (curl -i)?
- Activation + queue mode? Postgres SSH in use?
Paste sanitized config (redact secrets) and I will reply with the exact fix.
— myn8n-automation.org/guides/n8n-postgres-ssh-hang/

No form POST, no tracker, no cookie. You send it; we never auto-collect.

Instant Workflow Download

Claude Weekly Dev Summary for n8n ($29)

Want a production-tested automation ready to import today? Automatically turns any GitHub repo into an executive Friday 5pm summary delivered to Slack or Discord. 8 nodes, zero code, verified execution proof included.

Buy & Download on Gumroad ($29) Direct Crypto Checkout

Want a hands-on fix?

The diagnostic above is free to run. If you want me to diagnose and repair the workflow for you with test evidence and handoff notes, direct checkout is available instantly.

Instant Diagnostic ($15) — Direct Checkout

Direct client checkout. No platform intermediaries. No form, tracker, or cookie on this page.

Truth disclosure: This guide shows owned capability and a demo eight-node GitHub activity → Claude-assisted weekly summary → Slack/Discord workflow with local JSON/README/image evidence. No client result, sale, review, accepted bounty, earnings, or production customer outcome is claimed. The named preview businesses did not commission this work.

Governance Service hash 79e00b90d6bd2149 · sitemap 23 locs · 3 guides at 200 · bank-webhook 404 by intent. No tracker or cookie on this page. Direct engagement rails preserved.
More: Webhook · Timeout · Postgres SSH · Service · Previews