Closed
Description
Hello,
This week we tried to upgrade the version of the Weaviate python client to 4.8.0
as we wanted to try the support for multi vector search.
The code runs fine locally but when running in a task on AWS ECS we had problems with the connection, any request (queries, client.is_connected()
, client.get_meta()
, etc) stucks and we get timeout.
We can see in logs that the client initialization is successful and were able to hit the /meta
endpoint (also on our debug code it worked)
We also tried on version 4.7.1
with no luck
To be able to debug, I created the following FastAPI controller:
import logging
from pydantic import BaseModel
from fastapi import APIRouter
from fastapi.responses import JSONResponse
import weaviate
from weaviate.classes.query import Filter
logger = logging.getLogger(__name__)
router = APIRouter(prefix="/ui")
class StatusBody(BaseModel):
url: str
key: str
collection: str
field: str
value: str
@router.post("/status", response_class=JSONResponse)
async def status(body: StatusBody):
logger.info("Status endpoint")
with weaviate.connect_to_wcs(
cluster_url=body.url,
auth_credentials=weaviate.auth.AuthApiKey(body.key),
additional_config=weaviate.classes.init.AdditionalConfig(timeout=weaviate.classes.init.Timeout(init=10)),
skip_init_checks=True,
) as client:
logger.info("Status got client")
result = client.collections.get(body.collection).query.fetch_objects(
filters=Filter.by_property(body.field).equal(body.value),
limit=1
)
logger.info("Status got response")
data = result.objects[0].properties
logger.info(f"Status: {data}")
return data
When running it we saw the logs for "Status endpoint" and "Status got client" but never "Status got response".
Running locally worked fine