Hey all, we have a simple status endpoint which we use for uptime on a worker which uses D1, using D

Hey all, we have a simple status endpoint which we use for uptime on a worker which uses D1, using Drizzle ORM. We have a schedule which checks every 1 minute this endpoint.

The code is simple:

app.get("/status", async (c) => {
  await getDatabaseClient(c.env).select().from(schema.variables).limit(1);
  return c.text("OK");
});


Every so often (maybe once every few weeks) we get alerts coming through reporting the same error:

Error: D1_ERROR: Error 9000: something went wrong


No other errors / messages. Any idea what causes this? We use D1 for a critical part of our infra, so these sort of "unexplained" issues are a little concerning for us. Thanks!
Was this page helpful?