Hey, I recently moved some of our infra from KV to D1, with a database situated in every location to

Hey, I recently moved some of our infra from KV to D1, with a database situated in every location to be nearer to the user while awaiting global replication. This was working great, however after updating that data through our warming process (import all new data into a tmp database, rename old database, rename new database to old database name, drop old database), the databases all appear to be experiencing significant random latency issues. In our monitoring I can see average duration to call D1 jumping from ~20-50ms depending on worker location to some queries hanging for multiple seconds up to a minute. I'm wondering if someone can help me investigate what is going on here. Beyond completely recreating all these databases as part of our warming process I am not sure what the option is here. Our database is ~2GB in size and has 3.24 million rows. I am wondering if there's something going on internally like DO resets that is causing this behaviour. I've attached an example graph where you can see the moment the warming happened and the duration metrics afterwards. This is from the HKG PoP and with a D1 instance in APAC
Was this page helpful?