504: Gateway time-out on api.cloudflare.com

Hi, we are using you API for uploading items to KV, and last two days we see a lot of 504 errors on
https://api.cloudflare.com/client/v4/accounts/%s/storage/kv/namespaces/%s/bulk

Cloudflare Ray ID: 543a30c3900b93dc of last 504.

Usually, we putting 5000 items in one request. And it could be 50+ requests one by one. I tried to add a delay between requests, it looks like it won’t help, and this error pretty random. Usually, it’s 20-30 bulk requests and then 504 error on one of the next requests.

Anothet Ray ID: 543a882cb051280e

Solved by putting 1000 of items in one request, not 5000.

1 Like