ENHANCEMENT:Weaviate client connects and disconnects causing latency issues

Đang mở
#227 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

@vaishcodescape đang làm issue này rồi.

Từ ngày 11/1/2026.

  • #233 của @vaishcodescape — đã đóng, không merge
  • #234 của @vaishcodescape — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement
Is there an existing issue for this?
  • I have searched the existing issues
What happened?

📌 Issue Overview

The Weaviate backend client repeatedly connects and disconnects on every database operation instead of reusing a persistent connection, causing unnecessary performance overhead.

🔍 Root Cause

  • get_weaviate_client() calls await client.connect() on entry and await client.close() on exit
  • All Weaviate operations use async with get_weaviate_client(), triggering a full connect/disconnect cycle per request
  • This occurs despite having a global client instance

🚨 Actual Behavior

  • A new connection is established for every operation
  • The connection is closed immediately after use
  • No connection pooling or reuse
  • Adds ~10–50ms latency per query
  • Wastes resources and becomes a scalability bottleneck under load
@asynccontextmanager
async def get_weaviate_client():
    client = get_client()
    try:
        await client.connect()   # connects every time
        yield client
    finally:
        await client.close()     # disconnects every time

Record

  • I agree to follow this project's Code of Conduct
  • I want to work on this issue
Ngôn ngữ chính
Python
Star
103
Fork
143
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của AOSSIE-Org/Devr.AI

Tất cả issue của AOSSIE-Org/Devr.AI

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.