danielmiessler / danielmiessler/Fabric

[Bug]: Server hangs at Context= when using remote Ollama provider (ECONNRESET)

Open
#2,083 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
43.9k
Forks
4.3k
Avg merge
1d 4h
Merged PRs (30d)
8

Description

### What happened?

The Fabric server (--serve) correctly receives chat requests and identifies the model/pattern, but hangs indefinitely at the Context= log stage when connecting to a remote Ollama instance. This occurs even when the remote instance is reachable via fabric -L and curl. The hang eventually causes a socket hang up (ECONNRESET) in the Vite proxy.

Expected behavior
The server should initiate the stream from the remote Ollama API and begin outputting tokens immediately after context ingestion.

Actual behavior
The server appears to wait for a full response rather than streaming, or the handshake fails silently after the context is sent, causing the connection to zombie until a timeout occurs.

### Operating System

Windows

### OS Version

```shell
OS: Windows 11 (Host) / WSL2 Ubuntu

Fabric Version: 1.4.442

Model Provider: Ollama

Model: glm-4.7-flash:latest

Network: Local LAN (Port 11434 open, OLLAMA_ORIGINS="*" set) / tested on local install as well
```

### How did you install Fabric?

Other

### Version

```text

```

### Relevant log output

```shell
2026/04/06 15:27:41 Received chat request - Language: 'en', Prompts: 1

2026/04/06 15:27:41 Processing prompt 1: Model=glm-4.7-flash:latest Pattern=extract_insights Context=
```

### Relevant screenshots (optional)

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at the --serve chat request handling and the Ollama provider's streaming path, using the logged Context= stage as the entry point. Reproduce with the remote model and compare the server behavior with fabric -L and curl. Done means the remote Ollama API begins streaming tokens after context ingestion without hanging or causing a Vite-proxy ECONNRESET.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, ollama
Domain
ai, api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.