ENHANCEMENT:Weaviate client connects and disconnects causing latency issues

オープン
#227 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

@vaishcodescape がすでに取り組んでいます。

2026年1月11日 から。

  • #233 @vaishcodescape による — マージされずにクローズ
  • #234 @vaishcodescape による — オープン

評価

この issue はまだ評価されていません。

説明

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
主要言語
Python
スター
103
フォーク
143
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AOSSIE-Org/Devr.AI のほかの issue

AOSSIE-Org/Devr.AI の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。