ComfyUI Reconnecting Error: Fix the Stuck UI
Fix ComfyUI stuck on Reconnecting by checking backend crashes, 127.0.0.1, custom nodes, VPN/proxy/firewall blocks, websocket drops, and GPU crashes.
When the UI is stuck on Reconnecting..., the browser has lost its live connection to the ComfyUI server — usually because the backend crashed, froze, or restarted, or the browser can no longer keep the websocket open. Start with the backend terminal, not a reinstall.
30-second fix
Open the ComfyUI terminal first. If it has a traceback or closed, fix that backend error before touching the browser. If the terminal is still running, test http://127.0.0.1:8188 locally and then check VPN, proxy, firewall, or browser websocket blocks.
If the terminal is gone or unreadable, start with Failed to Fetch Server Logs. If the problem started after plugin work, also check Dependency Conflicts. If Manager says failed to get custom node list, use Failed to Get Custom Node List. If the log is timed out waiting for port 8188 or port 8188 is already in use, ComfyUI never became ready — use ComfyUI Startup Failed.
If the UI only shows Failed to fetch and does not clearly say Reconnecting..., use ComfyUI "Failed to Fetch" first to identify the failed request.
Triage
| What you see | Most likely cause | First check |
|---|---|---|
| "Reconnecting..." and terminal closed | Server crashed | Reopen the terminal log |
| Reconnects after a refresh | Frontend websocket dropped | Check browser console and extensions |
| Starts after installing nodes | Custom node or frontend extension conflict | Start with custom nodes disabled |
port 8188 is already in use | Another ComfyUI or app bound the port | Close the other process or start with --port 8189; see startup failed |
timed out waiting for port 8188 after 300s | Backend never finished starting | Read the first startup traceback, not the browser reconnecting banner; see startup failed |
| Starts during generation | GPU memory, crash, or long blocking task | Check terminal for the first error |
| Only on LAN or remote access | Firewall, proxy, VPN, or bind address | Test from localhost first |
failed to fetch server logs too | Log endpoint failed after the UI lost contact | Failed to Fetch Server Logs after checking the terminal |
Step 1: Check whether the server is still alive
Open the ComfyUI terminal window. If it is gone, frozen, or shows a traceback, treat the reconnecting message as a server-side failure. If it is still running, open http://127.0.0.1:8188 (use 127.0.0.1 before any LAN IP, reverse proxy, or remote address). If you changed the port, use that port.
Step 2: Read the first real error in the terminal
Do not start with the last line. Scroll up for the first serious error:
Traceback (most recent call last):
ModuleNotFoundError
ImportError
CUDA out of memory
RuntimeError
ConnectionResetErrorEverything after the first error may be a secondary symptom — a plugin import failure can break the server while the browser only reports reconnecting.
Step 3: Test without custom nodes
For a manual install:
python main.py --disable-all-custom-nodesFor the Windows portable package, copy your launch batch file and add --disable-all-custom-nodes. If it works with nodes disabled, the core install is probably fine — narrow down by re-enabling half the nodes, restarting, and repeating until you find the plugin. For deeper failures, use Plugin Import Failed. If Manager stopped loading node metadata before the loop started, check Failed to Get Custom Node List.
Step 4: Update frontend and requirements together
If you update ComfyUI with git pull, update dependencies in the same environment:
Do not run pip install -r requirements.txt blindly.
- Confirm which Python environment is active (
where pythonorwhich python) - Inspect
requirements.txt— check if it pins torch, numpy, or opencv versions - Install only the missing package when possible:
pip install <package-name> - Run
pip checkafter installation to verify no conflicts were introduced
For portable, use the bundled Python, not system Python. See Dependency Conflicts.
Step 5: Check browser and websocket issues
If the server is alive but the browser keeps reconnecting, try: reload with Ctrl+F5; use Chrome or Edge with extensions disabled; open DevTools and check Console and Network; test http://127.0.0.1:8188 instead of a LAN or proxy address; temporarily disable VPN, proxy, or aggressive antivirus web filtering. If it reconnects only in one browser profile, the backend is probably fine and the break is in the frontend path.
Step 6: Check port and firewall problems
If another app owns port 8188, ComfyUI may fail to bind. On Windows:
netstat -ano | findstr :8188If busy, start on another port (python main.py --port 8189) and open http://127.0.0.1:8189. For remote access, make sure the firewall allows the port and ComfyUI listens on the right interface.
Step 7: Check GPU or memory crashes during generation
If reconnecting appears only after Queue or during a run, check for CUDA out of memory, driver reset, model architecture mismatch, custom node execution error, or an OS-killed process. Try a smaller workflow: lower resolution, reduce batch size, close other GPU apps, test the default workflow, or run with --lowvram. If the terminal shows CUDA out of memory, see Python Out of Memory in ComfyUI and GPU Compatibility.
Best next step by trigger
| Trigger | Best next guide |
|---|---|
| Reconnecting started after a plugin or Manager update | Failed to Get Custom Node List |
| Terminal closes before the page fully loads | Startup Failed |
| Reconnecting starts only after Queue | Python Out of Memory |
| The UI opens but workflows show red nodes | Plugin Import Failed |
| You updated packages and things broke in bulk | Dependency Conflicts |
FAQ
Why does ComfyUI keep saying Reconnecting...?
The browser lost the live websocket connection to the backend. The backend may have crashed, a custom node may have broken startup, or the browser/network path may be blocking the connection.
Is failed to fetch server logs the same as reconnecting?
Not exactly. It is often a second symptom after the browser cannot reach the backend log endpoint. If that is the exact message, use the Failed to Fetch Server Logs guide after checking the terminal.
Should I use localhost or 127.0.0.1?
Use http://127.0.0.1:8188 first when diagnosing. If that works but a LAN IP or proxy fails, the problem is network binding, firewall, VPN, proxy, or browser access rather than ComfyUI itself.
Related Guides
- ComfyUI Failed to Fetch Server Logs
- ComfyUI Startup Failed? How to Diagnose and Recover Faster
- How to Fix ComfyUI Plugin Import Failed Errors
- ComfyUI Dependency Conflicts
- ComfyUI Common Issues and Fast Fixes
Source References
Start free with Wonderful Launcher if this affects your real ComfyUI environment. It keeps launcher-native repair, task logs, and runtime checks in one place; credits are only for image generation and metered tools.
Download Wonderful LauncherSee credit packagesDid this fix your issue?
Your answer helps prioritize verified ComfyUI repairs.