Dan
08/28/2025, 4:08 PMtsclient := typesense.NewClient(
typesense.WithConnectionTimeout(30*time.Second),
typesense.WithServer("http://"+os.Getenv("TYPESENSE_HOST")+":"+os.Getenv("TYPESENSE_PORT")),
typesense.WithAPIKey(os.Getenv("TYPESENSE_API_KEY")),
)
The actual typesense call is
feedback, err := tsclient.Collection("products_en").Documents().Import(newContext, documents, &tsapi.ImportDocumentsParams{
Action: pointer.Any(tsapi.Upsert),
BatchSize: <http://pointer.Int|pointer.Int>(5000),
})
if err != nil {
return fmt.Errorf("%w %s", err, debug.Stack())
}
Which errors out after <1s with context deadline exceeded (Client.Timeout exceeded while awaiting headers)
I know the batch size is high but it sometimes errors out even when upserting a single doc.
What am I missing here? 😩Dan
08/28/2025, 8:09 PM