google-cloud-platformgoogle-alloydb

Error on CREATE DATABASE: "INTERNAL: num blocks cache out of memory"


I'm creating multiple databases in AlloyDB to run tests in parallel. I create the first one (test) using the DDL statements and then - I'm cloning it using it as a template. After creating a few databases I'm starting to get following errors:

 db=dbname,user=user ERROR: [num-blocks-cache.cc:282] INTERNAL: num blocks cache out of memory
 db=dbname,user=user STATEMENT: CREATE DATABASE test12 OWNER=user TEMPLATE=test

The errors appear then in the logs from time to time on autovacuum. Also any subsequent attempt to create a database fails with the same error.

My wild guess is that the blocks cache run our of memory (that's not hard to guess, right?). I don't understand however why it happens - there is still available memory on the primary instance.

I'd be grateful if somebody could answer two questions: What's the root cause of this error? How could I avoid it?


Solution

  • This is a known issue with the preview (will be fixed by GA). The fix is to reach out to support and they can direct to our eng team to fix. The key to fast resolution is to include the error message that you have there, about the num blocks cache out of memory.