#community-help

Resolving Typesense API "Not Ready or Lagging" Error in Kubernetes

TLDR Hariharan is experiencing "Not ready or lagging" error with Typesense API in Kubernetes. Jason suggests using bulk import and exponential backoff, but the issue persists.

Powered by Struct AI
Feb 22, 2023 (8 months ago)
Hariharan
Photo of md5-18c41204e6fd9bb8436d758a90a0e5ef
Hariharan
04:48 AM
Hi! We deploy typesense cluster in kubernetes using k8s script using https://github.com/typesense/typesense-kubernetes. When we try to communicate with typesense api, we are getting "Server said: Not ready or lagging". Can some one help to resolve this issue?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:49 AM
Feb 23, 2023 (7 months ago)
Hariharan
Photo of md5-18c41204e6fd9bb8436d758a90a0e5ef
Hariharan
02:45 AM
Hi! I tried different values for write and read lag. But no luck. I keep getting this issue. It is not happening in single instance docker container.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
02:55 AM
It’s a back-pressure mechanism. You want to use the bulk import endpoint and then when you see a 503, pause writes for a bit and retry after a few minutes with exponential backoff
Hariharan
Photo of md5-18c41204e6fd9bb8436d758a90a0e5ef
Hariharan
09:09 AM
Hi! With exponential backoff, I tried to write data. I set the backoff as delay of 1000 and increment every iteration by 2 for max. of 5 attempts. Still it fails. At the same time, pods in kubernetes goes to crasherror loop.