[Errno -2] Name or service not known

Hi just a quick question about the error i got

I was querying with weaviate and sometimes i got an error saying [Errno -2] Name or service not known.

And for note i got this error not everytime but only occur sometimes

I’m using trafeik as reverse proxy as websecure for the http, but i set the connection to weaviate like this

weaviate_lib.connect_to_custom(
            http_host=WEAVIATE_REST_HOST,
            http_port=WEAVIATE_REST_PORT,
            http_secure=False,
            grpc_host=WEAVIATE_GRPC_HOST,
            grpc_port=WEAVIATE_GRPC_PORT,
            grpc_secure=False,
            headers={
                "X-OpenAI-Api-Key": OPENAI_API_KEY,
                "X-OpenAI-Organization": OPENAI_ORGANIZATION_ID
            },
            additional_config=AdditionalConfig(
                connection=ConnectionConfig(
                    session_pool_max_retries=3,
                ),
                timeout=Timeout(query=60, insert=120),
            )
        )

should i set http and grpc secure even though weaviate only communicate with non other than a service in the same reverse proxy configuration??

Hey @Fakhri_Prayatna_Putr,

I’m not an expert in Traefik, but from what you’ve described and if it is intermittent issue. You could try:

Increase session_pool_max_retries, sometimes increasing the retries or extending the timeout might help in mitigating temporary DNS resolution issues.

Or there could be some useful DNS resolution error logs in Traefik that could give insight into why the hostname sometimes fails to resolve.