Hey im getting this error 'binding DB of type d1 must have a valid `id` specified [code: 10021]' whe
Hey im getting this error 'binding DB of type d1 must have a valid
id
specified [code: 10021]' when trying to run wrangler dev --remote
, I have my binding setup with a preview_database_id as well!?19 Replies
D1 storage operation exceeded timeout which caused object to be reset
fires when a query takes too long to run (which I believe is 30 seconds, let me double check that) - adding an index to your query should help bring it downUnknown User•13mo ago
Message Not Public
Sign In & Join Server To View
Not yet, but we recommend https://github.com/nora-soderlund/cloudflare-d1-backups while we build a way to do it natively
Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View
this is explicitly for dumping D1's beta databases - alpha databases could be exported as sqlite binaries and dumped to SQL manually
Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View
But the whole migration is still executed in a transaction, right? From the SQLite docs: "It is not possible to enable or disable foreign key constraints in the middle of a multi-statement transaction (when SQLite is not in autocommit mode). Attempting to do so does not return an error; it simply has no effect." - https://www.sqlite.org/foreignkeys.html
So in terms of achieving better latency around the globe, using planet scale is better in the meantime as an alternative
I want to ask about design.
Anyone separates two endpoints like these:
* from d1 to durable objects
* from durable objects to response
The advantage of this design may be composability of DO.
Any thoughts?
What would the DO be doing in this case that you couldn't do Worker -> D1?
What are you building?
@HardlyHolidayin’ @rozenmd
Some reason like these:
Still don't know the cost of d1
only one DO but can hav a memory instance and avoid making demands on the physical store
assuming the team can't write sql
There's nothing we can't do with D1.
Should I have asked this question here?
D1 pricing is listed at https://developers.cloudflare.com/d1/platform/pricing/
Pricing · Cloudflare D1 docs
D1 is currently free to use during the public beta. Billing is expected to be enabled on December 1st, 2023 for developers using D1 on the Workers …
Hi! I am measuring calls to D1 from a worker and a simple select from a table with 1 record is taking around 280ms while in dashboard metrics the latency reported is 0-1ms.
-Is there a way to improve it?
-Is this because it is still on beta?
-Could it be worker execution region is diferent to d1 region (I am in south america)? I used automatic region setup on D1 creation but I am not able to see where it was placed.
Latency in the dashboard metrics is a measure of how long D1 took to run the query, 280ms sounds like how long it takes to run the query + get the result back to you
Read replication should help once it gets released
Could be - you can run
npx wrangler d1 info <dbname>
to see where your db is runningThanks! It seems my D1 is runnig on Eastern North America, so it makes sense that latency. Will read replication support replication in South America?
the issue is Durable Object support in South America, which (as far as I understand) is coming
Great news! 👏 Thanks again