weaviate / weaviate/typescript-client

gRPC: Receiving RST_STREAM on insertMany

Open
#154 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
101
Forks
38
Avg merge
4d 12h
Merged PRs (30d)
2

Description

Hello,

I'm actually migrating the client version (V2 -> V3) and when I try to batch insert a lot of documents (~1000), I get this error:

WeaviateBatchError: Batch objects insert failed with message: /weaviate.v1.Weaviate/BatchObjects INTERNAL: Received RST_STREAM with code 0 (Call ended without gRPC status)
      at /Users/me/app/node_modules/weaviate-client/dist/node/esm/grpc/batcher.js:42:17
      at processTicksAndRejections (native:1:1)

Batch objects insert failed with message: /weaviate.v1.Weaviate/BatchObjects INTERNAL: Received RST_STREAM with code 0 (Call ended without gRPC status)
37 |             metadata: this.metadata,
38 |             signal,
39 |           }
40 |         )
41 |         .catch((err) => {
42 |           throw new WeaviateBatchError(err.message);
                     ^
error: WeaviateBatchError: Batch objects insert failed with message: /weaviate.v1.Weaviate/BatchObjects INTERNAL: Received RST_STREAM with code 0 (Call ended without gRPC status)
      at /Users/me/app/node_modules/weaviate-client/dist/node/esm/grpc/batcher.js:42:17
      at processTicksAndRejections (native:1:1)

This error doesn't happen every time. It tends to occur more often when I try to insert larger documents, but the same insert can either be successful or lead to a crash.

I'm running locally, using Weaviate version 1.25.3 in a Docker container, and I use the weaviate-client v3.0.8 in an ESM Express app powered by Bun, and i bring my own vectors.

Here's my configuration:

const WeaviateClient = await weaviate.connectToCustom({
	// HTTP
	httpHost: config.weaviateURI,
	httpPort: 5000,
	httpSecure: false,

	// GRPC
	grpcHost: config.weaviateURI,
	grpcPort: 50051,
	grpcSecure: false,
});

Here's the logs from the docker i get after a failed request (LOG_LEVEL is set to "debug"):

{"action":"restapi_request","level":"debug","method":"GET","msg":"received HTTP request","time":"2024-06-25T13:34:49Z","url":{"Scheme":"","Opaque":"","User":null,"Host":"","Path":"/v1/schema","RawPath":"","OmitHost":false,"ForceQuery":false,"RawQuery":"","Fragment":"","RawFragment":""}}
{"level":"debug","msg":"server.query","time":"2024-06-25T13:34:49Z","type":2}
{"action":"lsm_init_disk_segment_build_bloom_filter_primary","class":"my_collection","index":"my_collection","level":"debug","msg":"building bloom filter took 208.625µs\n","path":"/var/lib/weaviate/my_collection/pN5G1xK1OOMa/lsm/property_vector/segment-1719322474400489347.db","shard":"pN5G1xK1OOMa","time":"2024-06-25T13:35:00Z","took":208625}
{"action":"lsm_memtable_flush_complete","class":"my_collection","index":"my_collection","level":"debug","msg":"flush and switch took 1.420272459s\n","path":"/var/lib/weaviate/my_collection/pN5G1xK1OOMa/lsm/property_vector","shard":"pN5G1xK1OOMa","time":"2024-06-25T13:35:00Z","took":1420272459}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the batch request path at node_modules/weaviate-client/dist/node/esm/grpc/batcher.js:42 and reproduce the intermittent failure using the reported ~1000-document insert, Weaviate 1.25.3 Docker setup, and custom gRPC configuration. Compare successful and failed runs with the provided Docker debug logs; done means the cause and reliable resolution for the RST_STREAM failure are established.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, docker, express, grpc, typescript
Domain
api, backend, databases, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.