Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable forcing of http2 for cloud connections #258

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

generall
Copy link
Member

I was able to reproduce the problem, reported by our users some time ago, regarding random

qdrant_client.http.exceptions.ResponseHandlingException: Server disconnected

errors in in consequent calls in FastAPI.

Here is a some fragment to reproduce:

app = FastAPI()

client = QdrantClient(
    url=os.getenv("QDRANT_URL", "http://localhost:6333"),
    api_key=os.getenv("QDRANT_API_KEY"),
)

@app.get("/api")
def read_root():
    client.get_collections()
    client.get_collections()
    return client.get_collections()

Query with:

seq 1000 | xargs -P 2 -I {} curl 'localhost:8000/api'

( full code to reproduce available at request)

the error is reproducible with raw httpx Client as well, so it is not some problem of the client wrapper.

Turns out the core reason is usage of http2 in out cloud connections. If http2 is disabled explicitly, no errors reproduced.
I do not remember why we turned it on in a first place, but it seems like everything is working fine with v1.1 as well.
@fabriziobonavita please confirm.

This PR disables automatic http2, but allows user to enable it with parameter.

@netlify
Copy link

netlify bot commented Aug 18, 2023

Deploy Preview for poetic-froyo-8baba7 ready!

Name Link
🔨 Latest commit 57b589c
🔍 Latest deploy log https://app.netlify.com/sites/poetic-froyo-8baba7/deploys/64dfed000244d00008b1b18a
😎 Deploy Preview https://deploy-preview-258--poetic-froyo-8baba7.netlify.app/qdrant_client.conversions.conversion
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant