Connection lost problem in my pc

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:

```

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto $scheme;

```

• Increase timeout values to prevent WebSocket disconnections:

```

proxy_read_timeout 86400;

proxy_send_timeout 86400;

```

Based on the community discussions at [community.n8n.io]( Reverse PROXY NGINX Problem ) and [dev.to]( Fixing WebSocket Connection Issues with Nginx Reverse Proxy - DEV Community ), this configuration should resolve your WebSocket connection issues. Make sure to restart Nginx after applying these changes!