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
a4amaan
a4amaanβ€’2mo ago
getting same issue
No description
birdfly
birdflyβ€’2mo ago
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?​⬀
katopz
katopzβ€’2mo ago
How can I wrangler kv key get from local disk? as i recall it has persist flag or something πŸ€”
Hello, I’m Allie!
β€”local?
katopz
katopzβ€’2mo ago
10 point for gryffindor! is it undoc? i can't find things
katopz
katopzβ€’2mo ago
but cli seem to have it 😡
No description
thomasgauvin
thomasgauvinβ€’2mo ago
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...
katopz
katopzβ€’2mo ago
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 😎
Hard@Work
Hard@Workβ€’2mo ago
AI Hallucinates --remocal, which tests in local/remote 50% of the time You just have to guess
xiaolong01
xiaolong01β€’2mo ago
Hi 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.
a4amaan
a4amaanβ€’2mo ago
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
thomasgauvin
thomasgauvinβ€’2mo ago
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.
Chaika
Chaikaβ€’2mo ago
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?
thomasgauvin
thomasgauvinβ€’2mo ago
Correct (edited in line) This has been resolved now!
Zack
Zackβ€’2mo ago
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?
Want results from more Discord servers?
Add your server