I'm trying to run multiple SQL statements at once. - When running multiple multi-line queries via D1
I'm trying to run multiple SQL statements at once.
- When running multiple multi-line queries via D1 REST API everything works.
- When running multiple multi-line queries via
env.DB.exec()
, I get an error. It can only parse multiple queries if each query is only a single line.
works via db.exec()
doesn't via db.exec()
16 Replies
There seems to be an issue with functions or D1. All of a sudden our deployments have started failing with
https://discord.com/channels/595317990191398933/789155108529111069/1298399101263806477
Same here: binding DB of type d1 failed to generate. Please try again later or contact support. [code: 10021]
The same issue here too: DB binding is throwing error
Check the link above, support are onto it 🙂
D1 team is asking what endpoint/function you are trying to work with?
We are also seeing this error.
We are trying to deploy the code using
npx wrangler deploy
Partial toml file
Deployments fail 100% of the time. and running the worker remotely also does not work.Not sure what you mean exactly here. Just a standard function that's linked to a d1 DB
I am seeing errors when binding in both Workers and Pages.
This is on a pages deployment
Should probably put an update on https://www.cloudflarestatus.com/
Cloudflare Status
Welcome to Cloudflare's home for real-time and historical data on system performance.
Being actively worked on (status page I mean), thank you.
Drizzle works fine w d1.
Are there any plans to make it possible to have dynamic service bindings for D1? E.g. for single-tenant DB situations. It seems the only options to make those work right now are either fill wrangler.toml with a ton of service bindings, or use D1's REST API instead of service bindings. Would prefer to avoid both of those....
I found this related post, but mainly checking on whether this is still planned or if we need to go a different direction. The 10gb-per-DB limit means multitenant isn't a great plan with d1 either