basically I want to have an integer in d1 be incremented on each request to a specific endpoint, wou
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?
16 Replies
getting same issue
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?β⬀
How can I
wrangler kv key get
from local disk? as i recall it has persist flag or something π€βlocal
?10 point for gryffindor! is it undoc? i can't find things
but cli seem to have it π΅
GitHub
[KV] Wrangler-KV Command Update by Oxyjun Β· Pull Request #16400 Β· c...
Summary
Continuation of the PR from: #15985
TLDR of this current PR:
Centralising Wrangler-KV commands into partials/workers/wrangler-commands/kv.mdx. This is the single source of truth for Wrang...
Thanks, that should save someone an hour π
. Actually it should able to auto generate/update from a cli. Maybe we could automate that somehow π€
Oh we can actually use llm to do just that + function call to made a PR, nice idea for next hackathon π
AI Hallucinates
--remocal
, which tests in local/remote 50% of the time
You just have to guessHi Cloudflare team,
I'm experiencing an issue with KV read operations and would like some clarification. In my project hosted on Cloudflare Pages, we have around 500k total visits, and within those, about 70k subrequests. However, I'm seeing an unexpectedly high number of KV read operations β specifically 13,919,754 reads β despite only storing around 20 items in the KV namespace and querying them by key.
I've checked my code, and it doesn't seem like there are any duplicate KV reads. The number of reads is way higher than what I would expect from our traffic. Could this be related to caching behavior, strong consistency, or something else I'm missing?
Any insights into how KV reads are calculated in this scenario would be greatly appreciated!
Thank you in advance for your help.
i got the same issue, and reported... i got answer that it is a small bug under resolution... and this high KV read is not currently impacting billing...
https://discord.com/channels/595317990191398933/874727019479437372/1280464457864319016
Hi @xiaolong01 and @a4amaan, that is correct, there is currently a bug in the dashboard & GraphQL API that is displaying higher metrics than what is accounted on your KV namespaces. We are working on a fix. This does not affect billing.
Hey Thomas π
Just to confirm, this wouldn't impact billing at all, and anyone effected doesn't need to ticket billing to get their bill adjusted or anything like that?
Correct (edited in line)
This has been resolved now!
Hey, trying to write some data to KV with a script I have used previously without issue, now seeing occasional 502 responses through from the API. Is there a current ongoing issue causing this?