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

gRPC connection hangs forever #55

Open
paciops opened this issue Nov 6, 2023 · 2 comments
Open

gRPC connection hangs forever #55

paciops opened this issue Nov 6, 2023 · 2 comments

Comments

@paciops
Copy link

paciops commented Nov 6, 2023

I was using QdrantClient with gRPC, at the end of my script the node.js process hangs forever.
Here there is small script to reproduce it (also as a gist).

const { QdrantClient, Distance } = require("@qdrant/js-client-grpc");

async function main(url, size, collectionName) {
  const client = new QdrantClient({ url });
  const createResponse = await client.api("collections").create({
    collectionName,
    vectorsConfig: {
      config: {
        case: "params",
        value: { size: BigInt(size), distance: Distance.Cosine },
      },
    },
  });
  console.log("collection creation response = ", createResponse.result);

  const deleteResponse = await client.api("collections").delete({
    collectionName,
  });
  console.log("collection deletion response = ", deleteResponse.result);

  return "done";
}

main("http://127.0.0.1:6334", 10, "sentences")
  .then((value) => console.log(value))
  .catch((error) => console.error(error));
@pnocera
Copy link

pnocera commented Dec 12, 2023

This happens in the rest client as well if you try to create a collection which already exists. Nodejs exits - even if you put your statement in a try / catch.
For now I check if the collection already exists before trying to create it.

@ryuusama09
Copy link

If this issue is up for grabs , then I would like to work on it !

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

No branches or pull requests

3 participants