Hi,
For those who are in 2022 or later with this same problem of Connection lost
when using nginx, traefik, or another reverse proxy.
The error is caused when the webUI tries to send a request to URI /rest/push?sessionId=12341234
expecting a text/event-stream
response and the reverse proxy tries to compress or buffer the response coming from n8n. When trying to compress or buffer the response gets infinitely stuck on the reverse proxy and the webUI never receives a valid connection.
To solve this you need to add flags that disable buffering or compression of responses in the reverse proxy.
Nginx
proxy_pass http://127.0.0.1:5678;
proxy_buffering off;
The important part is just proxy_buffering off; but I kept the proxy_pass for reference of where to insert in the proxy file. You know where to edit as you already have it set up and working.
Kubernetes
metadata:
annotations:
ingress.kubernetes.io/compress-enable: "false"
Traefik
[entryPoints]
[entryPoints.http]
address = ":80"
compress = false
[entryPoints.https]
address = ":443"
compress = false