n8n - 💡(How to fix) Fix 2+ open workflows cause intermittent (~every second or two) disconnection [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
n8n-io/n8n#28514Fetched 2026-04-16 07:05:20
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Timeline (top)
commented ×2labeled ×1mentioned ×1subscribed ×1

Error Message

  • error: all

Code Example

DOMAIN_NAME=srv1181679.hstgr.cloud
SUBDOMAIN=n8n
SSL_EMAIL=<my_email_redacted>
GENERIC_TIMEZONE=Europe/Berlin

---

services:
  traefik:
    image: "traefik"
    restart: always
    command:
      - "--api=true"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.web.http.redirections.entryPoint.to=websecure"
      - "--entrypoints.web.http.redirections.entryPoint.scheme=https"
      - "--entrypoints.websecure.address=:443"
      - "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true"
      - "--certificatesresolvers.mytlschallenge.acme.email=${SSL_EMAIL}"
      - "--certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - traefik_data:/letsencrypt
      - /var/run/docker.sock:/var/run/docker.sock:ro

  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: always
    ports:
      - "127.0.0.1:5678:5678"
    depends_on:
      - postgres
    labels:
      - traefik.enable=true
      - traefik.http.routers.n8n.rule=Host(`${SUBDOMAIN}.${DOMAIN_NAME}`)
      - traefik.http.routers.n8n.tls=true
      - traefik.http.routers.n8n.entrypoints=websecure
      - traefik.http.routers.n8n.tls.certresolver=mytlschallenge
      - traefik.http.middlewares.n8n.headers.SSLRedirect=true
      - traefik.http.middlewares.n8n.headers.STSSeconds=315360000
      - traefik.http.middlewares.n8n.headers.browserXSSFilter=true
      - traefik.http.middlewares.n8n.headers.contentTypeNosniff=true
      - traefik.http.middlewares.n8n.headers.forceSTSHeader=true
      - traefik.http.middlewares.n8n.headers.SSLHost=${DOMAIN_NAME}
      - traefik.http.middlewares.n8n.headers.STSIncludeSubdomains=true
      - traefik.http.middlewares.n8n.headers.STSPreload=true
      - traefik.http.middlewares.n8n.headers.customrequestheaders.X-Forwarded-Proto=https
      - traefik.http.services.n8n.loadbalancer.server.port=5678
      - traefik.http.middlewares.n8n-headers.headers.customrequestheaders.Origin=https://n8n.srv1181679.hstgr.cloud
      - traefik.http.routers.n8n.middlewares=n8n@docker,n8n-headers@docker
    environment:
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
      - N8N_PROXY_HOPS=1
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=<password_redacted>
      - N8N_PUSH_BACKEND=websocket
      - N8N_EDITOR_BASE_URL=https://n8n.srv1181679.hstgr.cloud
    volumes:
      - n8n_data:/home/node/.n8n
      - /local-files:/files

  postgres:
    image: pgvector/pgvector:pg14
    restart: always
    environment:
      - POSTGRES_USER=n8n
      - POSTGRES_PASSWORD=<password_redacted>
      - POSTGRES_DB=n8n
    volumes:
      - root_postgres_data:/var/lib/postgresql/data

  pgadmin:
    image: dpage/pgadmin4
    restart: always
    environment:
      - PGADMIN_DEFAULT_EMAIL=<email_redacted>
      - PGADMIN_DEFAULT_PASSWORD=<password_redacted>
    ports:
      - "127.0.0.1:8081:80"
    depends_on:
      - postgres

volumes:
  traefik_data:
    external: true
  n8n_data:
    external: true
  root_postgres_data:
    external: true
RAW_BUFFERClick to expand / collapse

Bug Description

2.15.X does not have this issue, 2.16.X does. When I have one workflow open (as in a browser tab), it's fine. I open a second one, and both start disconnecting and reconnecting. If it's happening you can't miss it - shows "Connection Lost" repeatedly at top-right corner of screen.

To Reproduce

I got this using hostinger, but since 2.15.X works fine, I know it's not a hostinger issue.

Replace things like N8N_EDITOR_BASE_URL=https://n8n.srv1181679.hstgr.cloud and redacted stuff, deploy the yaml below. I don't think any of the postgres stuff has anything to do with it, so you can probably remove it, but I left it in for completeness. Once you connect to it and open 2+ n8n workflows (as in in different tabs) it should start the disconnection cycle.

On, and I have these set in hostinger "environment":

DOMAIN_NAME=srv1181679.hstgr.cloud
SUBDOMAIN=n8n
SSL_EMAIL=<my_email_redacted>
GENERIC_TIMEZONE=Europe/Berlin

Docker YAML:

services:
  traefik:
    image: "traefik"
    restart: always
    command:
      - "--api=true"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.web.http.redirections.entryPoint.to=websecure"
      - "--entrypoints.web.http.redirections.entryPoint.scheme=https"
      - "--entrypoints.websecure.address=:443"
      - "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true"
      - "--certificatesresolvers.mytlschallenge.acme.email=${SSL_EMAIL}"
      - "--certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - traefik_data:/letsencrypt
      - /var/run/docker.sock:/var/run/docker.sock:ro

  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: always
    ports:
      - "127.0.0.1:5678:5678"
    depends_on:
      - postgres
    labels:
      - traefik.enable=true
      - traefik.http.routers.n8n.rule=Host(`${SUBDOMAIN}.${DOMAIN_NAME}`)
      - traefik.http.routers.n8n.tls=true
      - traefik.http.routers.n8n.entrypoints=websecure
      - traefik.http.routers.n8n.tls.certresolver=mytlschallenge
      - traefik.http.middlewares.n8n.headers.SSLRedirect=true
      - traefik.http.middlewares.n8n.headers.STSSeconds=315360000
      - traefik.http.middlewares.n8n.headers.browserXSSFilter=true
      - traefik.http.middlewares.n8n.headers.contentTypeNosniff=true
      - traefik.http.middlewares.n8n.headers.forceSTSHeader=true
      - traefik.http.middlewares.n8n.headers.SSLHost=${DOMAIN_NAME}
      - traefik.http.middlewares.n8n.headers.STSIncludeSubdomains=true
      - traefik.http.middlewares.n8n.headers.STSPreload=true
      - traefik.http.middlewares.n8n.headers.customrequestheaders.X-Forwarded-Proto=https
      - traefik.http.services.n8n.loadbalancer.server.port=5678
      - traefik.http.middlewares.n8n-headers.headers.customrequestheaders.Origin=https://n8n.srv1181679.hstgr.cloud
      - traefik.http.routers.n8n.middlewares=n8n@docker,n8n-headers@docker
    environment:
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
      - N8N_PROXY_HOPS=1
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=<password_redacted>
      - N8N_PUSH_BACKEND=websocket
      - N8N_EDITOR_BASE_URL=https://n8n.srv1181679.hstgr.cloud
    volumes:
      - n8n_data:/home/node/.n8n
      - /local-files:/files

  postgres:
    image: pgvector/pgvector:pg14
    restart: always
    environment:
      - POSTGRES_USER=n8n
      - POSTGRES_PASSWORD=<password_redacted>
      - POSTGRES_DB=n8n
    volumes:
      - root_postgres_data:/var/lib/postgresql/data

  pgadmin:
    image: dpage/pgadmin4
    restart: always
    environment:
      - PGADMIN_DEFAULT_EMAIL=<email_redacted>
      - PGADMIN_DEFAULT_PASSWORD=<password_redacted>
    ports:
      - "127.0.0.1:8081:80"
    depends_on:
      - postgres

volumes:
  traefik_data:
    external: true
  n8n_data:
    external: true
  root_postgres_data:
    external: true

Expected behavior

For it to not have connectivity issues...

Debug Info

Debug info

core

  • n8nVersion: 2.16.0
  • platform: docker (self-hosted)
  • nodeJsVersion: 24.14.1
  • nodeEnv: production
  • database: postgres
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)
  • consumerId: 807aafac-2771-40e0-bb08-a3d549e2dd50

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/147.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2026-04-15T08:46:57.916Z

Operating System

Ubuntu 24.04.3 LTS

n8n Version

1.26.X

Node.js Version

v24.14.1

Database

SQLite (default)

Execution mode

main (default)

Hosting

self hosted

extent analysis

TL;DR

The issue can likely be resolved by adjusting the N8N_PUSH_BACKEND environment variable or the WebSocket configuration in the n8n Docker setup.

Guidance

  1. Verify WebSocket Configuration: Check if the WebSocket configuration is correctly set up in the n8n Docker container. Ensure that the N8N_PUSH_BACKEND environment variable is set to websocket and that the WebSocket protocol is properly handled by the Traefik reverse proxy.
  2. Adjust N8N_PUSH_BACKEND: Try setting N8N_PUSH_BACKEND to a different value, such as long-polling, to see if the issue persists. This can help determine if the problem is specific to the WebSocket backend.
  3. Check Traefik Configuration: Review the Traefik configuration to ensure that it is correctly forwarding WebSocket connections to the n8n container. Verify that the traefik.http.routers.n8n configuration includes the necessary WebSocket settings.
  4. Test with a Different Version: Since the issue is reported to not occur in version 2.15.X, try downgrading to that version to see if the problem is specific to version 2.16.X.

Example

No code snippet is provided as the issue is related to the configuration of the n8n Docker setup and Traefik reverse proxy.

Notes

The issue may be related to changes in the WebSocket implementation or configuration between versions 2.15.X and 2.16.X. Further investigation is needed to determine the root cause of the problem.

Recommendation

Apply a workaround by adjusting the N8N_PUSH_BACKEND environment variable or the WebSocket configuration in the n8n Docker setup. This may help resolve the connectivity issues until a permanent fix is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

For it to not have connectivity issues...

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING