Skip to content

[Bug]: Search endpoint hangs after successful data upload and cognify (vLLM + Ollama) #2456

@Drexster

Description

@Drexster

Bug Description

Issue Summary

The /api/v1/search endpoint hangs and times out after data upload and cognify processing complete. Server operational, auth works, datasets API works, but search queries never return results.

Steps to Reproduce

Steps to Reproduce

  1. Deploy Cognee via Docker with vLLM + Ollama config (see above)
  2. Authenticate via /api/v1/auth/login (works ✅)
  3. Create dataset via /api/v1/datasets (works ✅)
  4. Upload 175 text chunks via /api/v1/add using multipart form-data (works ✅)
  5. Run cognify via /api/v1/cognify (appears to process successfully ✅)
  6. Search via /api/v1/search:

bash
curl -X POST http://localhost:8002/api/v1/search
-H "Authorization: Bearer "
-H "Content-Type: application/json"
-d '{"query": "test"}'

Expected Behavior

Expected Behavior

Search endpoint should return results with scores and matched text.

Actual Behavior

Actual Behavior

With LLM_PROVIDER=openai config:

  • Search hangs for 30+ seconds

  • Logs show error:

    [error] Error during brute force search for query: ['test']. Error: Constructor parameter should be str

  • Request times out, returns empty response

With LLM_PROVIDER=custom config (per docs):

  • Search hangs for 30+ seconds
  • Zero logs — request accepted, then complete silence
  • Request times out, returns empty response

Environment

Environment

  • Cognee Version: 0.5.5-local (Docker image cognee/cognee:latest)
  • Deployment: Docker on Windows server 2022/WSL2
  • LLM Provider: vLLM (local) via OpenAI-compatible endpoint
  • Embedding Provider: Ollama (local) - nomic-embed-text
  • Vector Store: LanceDB (file-based)
  • Graph Store: NetworkX (in-memory)
  • Data: 175 text chunks uploaded successfully
  • Cognify Status: Appears to have processed (entity extraction logs visible)

Configuration

Working Config (current) env

#LLM Config
LLM_PROVIDER=custom
LLM_MODEL=hosted_vllm/Qwen3-8B
LLM_ENDPOINT=http://host.docker.internal:8000/v1
LLM_API_KEY=.
LLM_INSTRUCTOR_MODE=json_schema_mode

Embedding Config

EMBEDDING_PROVIDER=ollama
EMBEDDING_MODEL=nomic-embed-text
OLLAMA_BASE_URL=http://host.docker.internal:11434

Tokenizer

HUGGINGFACE_TOKENIZER=bert-base-uncased

Vector DB

VECTOR_DB_PROVIDER=lancedb

Graph DB

GRAPH_DB_PROVIDER=networkx

Flags

SKIP_MIGRATIONS=true
COGNEE_SKIP_CONNECTION_TEST=true
ENABLE_BACKEND_ACCESS_CONTROL=false

Also Tested (earlier attempt)

env
LLM_PROVIDER=openai
LLM_MODEL=openai/Qwen/Qwen3-8B
LLM_ENDPOINT=http://host.docker.internal:8000/v1
LLM_API_KEY=EMPTY

Logs/Error Messages

Additional Context

Additional Context

  • Data successfully uploaded: 175/175 chunks confirmed in dataset
  • Cognify appears successful: Entity extraction logs visible during processing
  • Other endpoints work: Auth, datasets, add all functional
  • Only search is broken: No other API functionality affected
  • Time invested: 19+ hours of debugging

What We Tried

  1. ✅ Switched from ChromaDB to LanceDB (Docker compatibility)
  2. ✅ Changed API key from "dummy-key" → "EMPTY" → "." (per LiteLLM docs)
  3. ✅ Switched LLM_PROVIDER from openaicustom with hosted_vllm/ prefix (per Cognee docs)
  4. ✅ Added LLM_INSTRUCTOR_MODE=json_schema_mode (per GitHub issue [Docs]: Setting up custom LLMs #1500)
  5. ✅ Verified dataset exists via /api/v1/datasets endpoint (works)
  6. ✅ Verified auth works (generates valid tokens)
  7. ✅ Confirmed vLLM endpoint functional (tested directly outside Cognee)
  8. ✅ Confirmed Ollama embeddings functional (tested directly outside Cognee)

Nothing fixed the search endpoint.

Suspected Root Cause

The error "Constructor parameter should be str" suggests Cognee's search implementation is passing a list (['query']) to something expecting a string ('query'). This appears to be a bug in the search layer, not our configuration.

Request

Can you help us debug why the search endpoint silently hangs after successful data upload and cognify? Are there additional debug flags or logs we can enable to see what's failing?

Pre-submission Checklist

  • I have searched existing issues to ensure this bug hasn't been reported already
  • I have provided a clear and detailed description of the bug
  • I have included steps to reproduce the issue
  • I have included my environment details

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions