Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

Perhaps I'm not being clear enough —

Perhaps I'm not being clear enough — when we were seeing these errors, we were doing perhaps 5 requests in a 5 minute period, which should be safe enough given the 1200 limit?

Well, this guide looks to be from back

Well, this guide looks to be from back when Workers Sites were still a thing. You can use Assets now for free asset serving

Does anyone have a reference code on how

Does anyone have a reference code on how to create a full export of a kv namespace? I am trying to write one myself but I am running into a lot of different issues, ranging from invalid cursors to max subrequest errors and/or inconsistent results. The kv I am testing with shows about 8.5k records in the cloudflare ui where I am already running into issues, the different production kv I will need to export will have around 144k entries so I am a bit worried about being able to export it successfully. My use-case is that we have a kv setup with redirects (key is the original url, target url is the value of the kv record), with data imported overtime from multiple files and we now sadly lack a "master file" with all our data. So to create this masterfile I want to export the current state of the kv into a csv so that the data can be analysed by business users in excel....

Durable Objects aren't just durable, the...

I just read: https://blog.cloudflare.com/how-we-built-cloudflare-queues/ Also the part "Workers KV acts as a fast metadata store: our Worker can quickly look up the shard map to perform load balancing across shards" How can they use KV for that, as KV has a 60 second delay to update after writing? Won't the entire infrastructure have a 60 second delay to understand what the state is and how would the be able to update that state?...

Can you all DM me your Workers account

Can you all DM me your Workers account id and KV namespace id

I am using the binding API. I would also

I am using the binding API. I would also like to add that it's not only latency. For me in some cases the values are never written.

Self-deleting KV’s

I'm using KV to cache browser screenshots as described in this doc: https://developers.cloudflare.com/browser-rendering/get-started/screenshots/ In that doc, the expirationTtl for the screenshots in KV is being set to 24 hours. My ideal would be to make the expiry much longer (e.g. 1 month), but with an implementation like an LRU cache where the TTL would reset whenever the value is read, so that only keys that haven’t been read for 1 month are evicted. Is there a way to accomplish something like that with KV, or is there another product that would be better suited for that kind of implementation? I did a search in discord and found this message, which suggests that KV’s expiration TTL isn’t the way to achieve this, but then because reading a value with a cacheTtl parameter resets any previous cacheTtl from a previous read, I thought there could be something there....

Hi, running into some weird eventual

Hi, running into some weird eventual consistency behavior with KV - when updating a KV key value pair (via the API), accessing it via worker seemingly randomly returns the old version and switches back and forth to the new updated one. Any ideas? cacheTtl used to be set to 5 minutes, but this issue has been apparently occurring for the past 24 hours

I'm running a worker locally (`wrangler

I'm running a worker locally (wrangler dev) and trying to access some KV keys I've set using wrangler kv key put ... --local <key> <value> but my <kvnamespace>.get in my worker always returns null. I tried listing them from the worker too, and there's no keys at all. Listing them with "kv key list --local" tells me they are there. I can also read them with kv key get. Any suggestions on where I should start to dig to figure it out?

In the kv docs /getting-started

In the kv docs /getting-started I can't get this command to work: npx wrangler kv key put --binding=<BINDING_NAME> "<KEY>" "<VALUE>"...
No description

Renaming KV namespaces

I remember that it could be renamed in the past but now it seems not to work anymore

@thomasgauvin really awesome view and

@thomasgauvin really awesome view and great information source. One thing that I noticed is that if KV is big it doesn't show KV count

List keys | Cloudflare Workers KV

Hi all, when I am using list method and cursor for pagination (https://developers.cloudflare.com/kv/api/list-keys/#list-method). What happens if I have 1 milion keys and when I get a page I trigger delete of that keys and then use cursor to go to the second page? Would cursor have an old list so it will continue serving correct pages even though that I am deleting keys in the background?

For the first time I got the message "

For the first time I got the message "Daily request limit exceeded for Cloudflare Workers" This worker have an average (and pretty stable) of 250/350 writes every day, and I just checked on the dashboard without seeing anything strange. How should I best proceed? Thank you!...

Hello

Hello I frequently encounter code 971 issues while using KV. Could you please clarify what specific limitation this refers to? How can I adjust to reduce the occurrence of this problem?​⬤...

basically I want to have an integer in

basically I want to have an integer in d1 be incremented on each request to a specific endpoint, would it be possible to use kv to temporarily store how much needs to be added and then add it on a schedule? if so would that globally work since kv is local on the machine to my knowledge?

Hi there!

Hi there! When keys are removed due to TTL expiration using the expirationTtl option, do those removals count toward the delete request quota ? Thanks!...

I figured it out by reading throught the

I figured it out by reading throught the plugins docs it these ones should be updated to include you need to process like this ```export default eventHandler(async (event) => { const { ARCKV } = event.context.cloudflare.env; ...

Unknown KV usage origin

Guys, the problem still exists, I've deleted KV, but due to GraphQL Api, the counter continue to increase.. { "dimensions": { "namespaceId": "00000000000000000000000000000000" },...
Next