D1 in workers constant query errors & timeouts

starting around 8 hours ago today, I started receiving a bunch of these two errors and queries started timing out or taking far longer than usual. Does anyone know a way to fix?
Error: Error: D1_ERROR: D1 is overloaded. Too many requests queued.
Error: Error: D1_ERROR: D1 is overloaded. Requests queued for too long.
Error: Error: D1_ERROR: D1 is overloaded. Too many requests queued.
Error: Error: D1_ERROR: D1 is overloaded. Requests queued for too long.
7 Replies
Khafra
KhafraOP2mo ago
Going to the database console and entering select 1; hangs and part of the page (table size, tables) doesn’t load. The total size of all tables is 3.72 Mb
Walshy
Walshy2mo ago
what's your account id + db id? and how much traffic is being sent to the db?
Khafra
KhafraOP2mo ago
account id - bd22ac056a23329365c8a57927490701 db id - 2bd61136-7eb6-4b5d-82ce-f3405294398d traffic wise from Nov 1 -4 read: 107m written: 1.8k
Walshy
Walshy2mo ago
i don't really see volume changing but i see latency and errors just jumping right up
Khafra
KhafraOP2mo ago
yeah :/
Walshy
Walshy2mo ago
let me get this escalated to the team, i can't see anything that would indicate you did anything to cause this
Khafra
KhafraOP2mo ago
ty 🙏 I disabled the db call that was making a majority of those read requests and I haven't had any more issues. The call was:
return await ctx.env.DB.prepare('SELECT * FROM events;')
.all()
.then((r) => Response.json(r.results ?? [], { headers: corsHeaders }))
return await ctx.env.DB.prepare('SELECT * FROM events;')
.all()
.then((r) => Response.json(r.results ?? [], { headers: corsHeaders }))
where the events table consisted of 0-2 items normally, right now it has 2 items:
select * from events
name url start end quark goldenQuark cubes powderConversion ascensionSpeed globalSpeed ascensionScore antSacrifice offering obtainium octeract blueberryTime ambrosiaLuck oneMind color
Happy (Possibly Late) Halloween https://www.youtube.com/watch?v=RcZn2-bGXqQ 2024-10-31T00:00 2024-11-02T12:59 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.01 #ff8040
Halloweekend https://www.youtube.com/watch?v=DvQj8dT0Ctg 2024-11-02T00:00 2024-11-03T23:59 0.66 0.06 0.66 0.66 0.66 0.66 0.06 0.66 0.66 0.66 0.66 0.16 0.16 0.16 #ff9500
select * from events
name url start end quark goldenQuark cubes powderConversion ascensionSpeed globalSpeed ascensionScore antSacrifice offering obtainium octeract blueberryTime ambrosiaLuck oneMind color
Happy (Possibly Late) Halloween https://www.youtube.com/watch?v=RcZn2-bGXqQ 2024-10-31T00:00 2024-11-02T12:59 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.01 #ff8040
Halloweekend https://www.youtube.com/watch?v=DvQj8dT0Ctg 2024-11-02T00:00 2024-11-03T23:59 0.66 0.06 0.66 0.66 0.66 0.66 0.06 0.66 0.66 0.66 0.66 0.16 0.16 0.16 #ff9500
(copied from the dashboard, sorry about formatting) I ended up replacing d1 with kv since it suited our needs better (high read volume, low writes), haven't had any issues yet 🙂
Want results from more Discord servers?
Add your server