Bulk Indexing Issue with 3 Million Posts

TLDR Digamber is facing a cURL error 28 while bulk indexing 3 million posts. Kishore Nallan suggests checking post body size and possibly encountering a 503 status code.

Photo of Digamber
Digamber
Thu, 09 Mar 2023 11:49:10 UTC

Hi Guys, I have 3 million posts, and i’m bulk indexing and during the indexing process i run tino cURL error 28,

Photo of Kishore Nallan
Kishore Nallan
Thu, 09 Mar 2023 11:50:22 UTC

The post body might be too large

Photo of Digamber
Digamber
Thu, 09 Mar 2023 11:51:48 UTC

The thing is it bails after different times

Photo of Kishore Nallan
Kishore Nallan
Thu, 09 Mar 2023 11:52:24 UTC

What's the size of the file being posted?

Photo of Digamber
Digamber
Thu, 09 Mar 2023 11:52:28 UTC

Additionally - the current code is doing a request to /health to check condition

Photo of Digamber
Digamber
Thu, 09 Mar 2023 11:52:51 UTC

that’s when it’s being bailed

Photo of Kishore Nallan
Kishore Nallan
Thu, 09 Mar 2023 11:53:09 UTC

Are you using the php client?

Photo of Digamber
Digamber
Thu, 09 Mar 2023 11:53:29 UTC

No we’re making cURL requests

Photo of Kishore Nallan
Kishore Nallan
Thu, 09 Mar 2023 11:53:56 UTC

So the thing is if you write too fast, Typesense can return 503 status code as a backpressure mechanism to let writes catch up

Photo of Kishore Nallan
Kishore Nallan
Thu, 09 Mar 2023 11:54:21 UTC

If you get a 503, backoff and retry after a short interval.

Photo of Digamber
Digamber
Thu, 09 Mar 2023 11:57:32 UTC

ok let me see if i can reduce the payload and test it out again. Also - not sure if i’m getting a 503 error - will verify and check

Photo of Digamber
Digamber
Thu, 09 Mar 2023 12:06:33 UTC

Also can you let me know how to measure payload size here ?

Photo of Kishore Nallan
Kishore Nallan
Thu, 09 Mar 2023 12:07:17 UTC

The raw jsonl post you are passing. Max payload size is 10 G so I don't think you are running into that.

Photo of Digamber
Digamber
Thu, 09 Mar 2023 12:07:43 UTC

yeah - ok, that’s probably not it - no way i’m going over 10G

Photo of Digamber
Digamber
Thu, 09 Mar 2023 12:07:53 UTC

will do some more test