D1 & heavy traffic in Production

Hello guys!

For the past week I’ve been setting up Cloudflare Worker to work with D1. Worker is very simple, just few selects from the database & a return response as json.

On local machine it works fine, after deployment it works fine, but if I switch half of our traffic to that worker… we get like 97% crashes by “D1_ERROR”

Could that be because we have up to 100 req/sec traffic or I have to enable some extra settings or Alpha is just not ready for this kind of request amount?

The worker itself is simple, GET request with few parameters - those parameters are used to query/select data from the DB. Response json is being cached after successful return.

D1_ERROR by itself is very abstract:

  message: 'D1_ERROR',
  cause: 'Error: Error 9000: something went wrong'

Appreciate any advice :slight_smile:

1 Like