Skip to content

fix: explicitly disable HTTP/2 in undici Agent to prevent inference hangs#132

Open
andreyobsidiam wants to merge 1 commit intoqdrant:masterfrom
andreyobsidiam:fix/http2-inference-hang
Open

fix: explicitly disable HTTP/2 in undici Agent to prevent inference hangs#132
andreyobsidiam wants to merge 1 commit intoqdrant:masterfrom
andreyobsidiam:fix/http2-inference-hang

Conversation

@andreyobsidiam
Copy link
Copy Markdown

Summary

  • Explicitly set `allowH2: false` in the undici `Agent` options to guarantee HTTP/1.1
  • Prevents HTTP/2 ALPN negotiation which causes upsert requests with Cloud Inference vectors to hang indefinitely inside Docker containers
  • Zero behavioral change for normal cases (allowH2 is already false by default); makes the guarantee explicit

Problem

Using `client.upsert()` with inference vectors (`vector: { text, model }`) hangs forever inside Docker containers. The same request via curl HTTP/1.1 completes in ~86ms.

Solution

One-line addition in `packages/js-client-rest/src/dispatcher.ts`:

```ts
new Agent({
// ...
allowH2: false,
})
```

Testing

  • Manual test: upsert with inference vectors now completes in ~200ms inside Docker (was: infinite hang)
  • Existing unit tests pass (no change to API surface)

Related Issue

Fixes #131

@andreyobsidiam andreyobsidiam force-pushed the fix/http2-inference-hang branch from 954d00d to fc9a8c5 Compare April 7, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upsert with Cloud Inference vectors hangs indefinitely (HTTP/2 issue with undici)

2 participants