Git Product home page Git Product logo

Comments (8)

Fluder-Paradyne avatar Fluder-Paradyne commented on June 17, 2024 2

It is hard to replicate with a simple script
I tried writing one but It was not getting this warning

basically there could be multiple client objects at the same time
I know it is not the best way, but in the use case I am working on it is hard to pass around single client.
so far in my testing I am only getting warnings, so I am not too concerned

It would be great if there is a close or __del__ method so, we can just close the client once work is done
instead of waiting for gc to take care of this

thanks 😄

from qdrant-client.

joein avatar joein commented on June 17, 2024 2

supported as of 1.4.0, feel free to re-open the issue in case of troubles

from qdrant-client.

joein avatar joein commented on June 17, 2024 1

@michael-newsrx local mode close method will be delivered with #227 as well

from qdrant-client.

Fluder-Paradyne avatar Fluder-Paradyne commented on June 17, 2024

I am getting
ResourceWarning: unclosed <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.176.7', 33516), raddr=('192.168.176.2', 6333)>
is there any method for this

from qdrant-client.

joein avatar joein commented on June 17, 2024

There is no method to terminate connection in user interface, we close grpc connections during object deletion stage
In other cases, we relied on the underlying cleaners.

We probably can expose method to close http connections explicitly or will add it into the __del__ as well

@Fluder-Paradyne could you provide more information about your setup please? Including python version, qdrant-client version, os? Code sample to reproduce the issue is appreciated.

from qdrant-client.

michael-newsrx avatar michael-newsrx commented on June 17, 2024

I just ran into this issue in a Jupyter notebook.

Using a local client, if a second copy instantiation is attempted, it fails. Think interactive usage and debugging a specific cell. There does not appear to be a way to cleanly close the client. I recommend adding a .close() as well as auto close via context manager if possible.

from qdrant-client.

joein avatar joein commented on June 17, 2024

#227

from qdrant-client.

joein avatar joein commented on June 17, 2024

@michael-newsrx I will look into the possible options with local mode a bit later

from qdrant-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.