Skip to content

Conversation

@nicholaspsmith
Copy link
Owner

Summary

  • Add 5-minute timeout to embedding requests using AbortController
  • Reduce default concurrency from 100 to 10 parallel requests (less overwhelming for Ollama)
  • Add detailed logging showing batch progress within each embedBatch call

This helps diagnose and prevent indefinite hangs during embedding, and provides better visibility into what's happening.

Example log output:

[lance-context] Embedding 2000 texts in 20 batches (concurrency: 10)
[lance-context] Embedded batch group 1/2 (1000/2000 texts) in 3.2s
[lance-context] Embedded batch group 2/2 (2000/2000 texts) in 3.1s

Test plan

  • Start indexing a large codebase
  • Verify batch progress logs appear in stderr
  • Verify requests timeout after 5 minutes if Ollama is unresponsive

🤖 Generated with Claude Code

- Add 5-minute timeout to prevent indefinite hangs
- Reduce default concurrency from 100 to 10 parallel requests
- Add logging for batch progress within embedBatch calls

Co-Authored-By: Claude <noreply@anthropic.com>
@nicholaspsmith nicholaspsmith merged commit 3e06254 into main Jan 27, 2026
2 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 27, 2026
## [1.18.4](v1.18.3...v1.18.4) (2026-01-27)

### Bug Fixes

* add timeout and logging to Ollama embedding requests ([#82](#82)) ([3e06254](3e06254))
@github-actions
Copy link

🎉 This PR is included in version 1.18.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nicholaspsmith nicholaspsmith deleted the fix/ollama-timeout-and-logging branch January 27, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants