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
NNehalAli5/10/2024

Alpha database migration guide · Cloudfl...

Hello , i am trying to perform an alpha database migration for one of my alpha databases , i followed this guide: https://developers.cloudflare.com/d1/platform/alpha-migration/#1-verify-that-a-database-is-alpha but i keep getting error Internal error: failed to run backup: Failed to query D1: D1 API returned: (500 Internal Server Error) {"error":"Error 9000: something went wrong","success":false} [code: 7500] when i run wrangler d1 backup command , any idea how to resolve this ?...
Kkrofdrakula5/8/2024

Can prepared statements bind arrays for `IN (?)`

does anyone know if prepared statements can be bound with arrays? i'm trying to do a query like db.prepare('SELECT * FROM table WHERE status IN (?)').bind(['active','expired']).all(), would that work?
CCat5/7/2024

Hey all, is something up with `wrangler

Hey all, is something up with wrangler d1 info + wrangler d1 insights? info is reporting 0 read queries in the past 24h (not the case unless it's somehow using some local version? The ID is the same as in my CF dash) insights is returning an empty array regardless of configuration...
MMiyagi5/3/2024

Hello, I have had success with the D1 in

Hello, I have had success with the D1 in development all the way until production deployment. I have bound it using the updated syntax from docs (Pages). When i attempt to query when deployed, It crashes with Application Error. Works just fine in wrangler preview. AccountId: 77e1b1d919d86d253e4967517aab4437...
Sstridex4/26/2024

i'm getting `Error: D1_ERROR: D1 is

i'm getting Error: D1_ERROR: D1 is overloaded. Too many requests queued. for the last while. its a tiny little d1 database with no traffic
EEnvy4/25/2024

Are older d1 databases still 2gb? Mine

Are older d1 databases still 2gb? Mine just hit 2gb and stopped working
Hhungtruong4/15/2024

So I think I found a bug where simply

So I think I found a bug where simply looking at a D1 database in the dashboard causes a huge number of rows to be read. I have indexes for all of my queries and the high number of rows read is happening only when I pull up the database (simply looking at the table data).
No description
HHannes4/15/2024

Importing a 13MB SQL File

Hi, I'm having trouble importing my database. I'm using `npx wrangler d1 execute --config packages/root/wrangler.toml --e production --remote --file "mydb.sql" mydb-prod-main While that works locally (with --local), it fails with a 504 Gateway timeout each time I try it... Any idea how to work around that? The .sql file is 13MB....
No description
MRMax (@rozenmd)4/15/2024

only alpha dbs shouldn't have a usage

only alpha dbs shouldn't have a usage dashboard, what do you see?
Bbun4/13/2024

what does it mean migrations are not run

what does it mean migrations are not run in production ?
Eelithrar3/27/2024

To confirm: do you mean the DB and

To confirm: do you mean the DB and contents, or just the schema?
Mmw100133/24/2024

GitHub - mw10013/remix-auth-totp-cloudfl...

Yes, that works with remix+vite. I found that it’s not necessary to specify the bindings in the command line when running locally. Just let ‘remix vite:dev’ pick them up from wrangler.toml and include the local bindings in the wrangler.toml. I put together the cloudflare example for ‘remix-auth-totp’ that uses drizzle with d1 that has the local bindings in wrangler.toml. https://github.com/mw10013/remix-auth-totp-cloudflare-example
MRMax (@rozenmd)3/22/2024

D1 local seed data

I'm not sure I understand what you're trying to do here, no queries/migrations will be run against your remote DB unless you explicitly add the --remote flag
PGEPrisma Gestión Empresarial3/20/2024

~migrations broke??~ i can't read

did the migrations script break for anyone? I got a github action that always runs d1 migrations apply <DB> and it always did a check to see if there where any new migrations to apply and applied them (if none, then did nothing). but since my last commit ~30 mins ago, it started applying them all over again (not just the new ones)...
MRMax (@rozenmd)3/19/2024

are you using db.batch?

are you using db.batch?
MRMax (@rozenmd)3/1/2024

you just did 😅

you just did 😅
SSantosh2/25/2024

DO/D1 smart placement

If it is 1 -10 ms latency, thats wonderful. Based on the earlier conversations we have had regarding about DO locations (where do DO live links), DO's are available only in a few DC (For example SGA for an Indian audience). And the minimal latency for DO location from MUmbai would be 200 ms according to the web site. I am making some assumptions here a. That the D1 replicas when they come into pic after Q1 would still live near SGA like locations due to colo reqs 2. Not just initial connections...
SMSébastien Morel2/14/2024

hello here,this change about `.run` I

hello here,this change about .run I have updated the types and wrangler and I still see that run returns a D1Response. What I am missing?
Yyeehow2/9/2024

Is there an outage with the D1 API right

Is there an outage with the D1 API right now? The databases work when queried, but can't access them on the dash and errors when trying to apply a migration....
No description
Next