comfyui connecting reconnecting isuue when using iis as reverse proxy
The image reveals a critical piece of information that changes the entire troubleshooting path: You are routing your traffic through Cloudflare (Server: cloudflare, CF-RAY: ...-SIN) before it ever hits your local Windows 11 IIS proxy (X-Powered-By: ARR/3.0). [1]
Your browser is sending the WebSocket request with compression enabled (
Sec-WebSocket-Extensions: permessage-deflate), but IIS ARR 3.0 breaks when proxying compressed WebSockets over a third-party CDN like Cloudflare, leading to the instant connection crash and loop you are seeing. [1]To completely solve this, you need to strip that specific WebSocket compression extension header so IIS and Cloudflare can talk cleanly.
The Fix: Force IIS to Strip WebSocket Compression Extensions
You need to use the URL Rewrite module on your Windows 11 IIS site to forcibly clear the
HTTP_SEC_WEBSOCKET_EXTENSIONS variable. [1]Step 1: Allow Server Variable Overrides in IIS
- Open IIS Manager.
- Click your main Windows 11 Server/Machine Name in the left column.
- In the center pane, double-click URL Rewrite.
- In the far-right Actions column, click View Server Variables....
- Click Add... on the right menu.
- Type exactly:
HTTP_SEC_WEBSOCKET_EXTENSIONSand hit OK.
Step 2: Edit Your Reverse Proxy Inbound Rule
- Go back to the URL Rewrite screen by clicking "Back to Rules" in the top-right corner.
- Select your existing Reverse Proxy rule (the one handling the traffic going to ComfyUI) and click Edit... on the right.
- Scroll down and expand the Server Variables section.
- Click Add....
- Set Server variable name to:
HTTP_SEC_WEBSOCKET_EXTENSIONS - Set the Value to: (Leave this completely empty)
- Check the box for Replace existing value.
- Click OK.
Step 3: Apply and Reset
- In the far-right column, click Apply.
- Open a Command Prompt as Administrator and run
iisresetto clear any hung proxy loops.
Comments
Post a Comment