Hi, struggling with the typesense-go lib, I'm gett...
# community-help
d
Hi, struggling with the typesense-go lib, I'm getting context deadlines exceeded < 1 second. Can't figure out why this is occurring, I've tried using a new context, and my client constructor is as follows:
Copy code
tsclient := 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
Copy code
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? 😩
✅ 1
Ignore, resolved 🙂