Hello,
I am experiencing a persistent “Connection lost” error on my n8n instance. My workflows are unable to run properly because of this.
I have checked the Chrome Developer Tools and it appears that the WebSocket connection is failing to establish—no WebSocket traffic is visible in the network logs.
This strongly indicates that the necessary headers are not being passed through the reverse proxy (like Nginx) on the server side.
Could you please check and fix the server’s reverse proxy configuration to ensure the “Upgrade” and “Connection” headers are correctly configured to allow WebSocket traffic?
Thank you
Describe the problem/error/question
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Hi Manisha! You’re absolutely right that this is a WebSocket configuration issue with your reverse proxy. The “Connection lost” error occurs when the proxy doesn’t properly handle WebSocket upgrades that n8n needs for real-time communication.
Here’s what needs to be fixed in your Nginx configuration:
• Add these essential headers to your location block:
```
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_http_version 1.1;
```
• Also include these headers for proper WebSocket support: