Strapi v4 + Postgres + Render.com = Error "Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?"

No solution…

We switched from PostgreSQL to MariaDB out of frustration. We don’t get anymore the Knex: Timeout acquiring a connection, but we get some more descriptive errors.

One bug we figure out is sometimes columns name were too long (more then 64 characters), like described into this bug Tracking Issue - Database table, column, index, and foreign keys are too long · Issue #13117 · strapi/strapi · GitHub. So for now we manually shorten the collectionName as described here Error: ER_TOO_LONG_IDENT | Too long column names hit character restriction in database · Issue #12101 · strapi/strapi · GitHub

Another bug we’re always running into is ER_DUP_KEYNAME: Duplicate key name when running automatic migrations on production. So far we’ve been able to solve it by manually purging the strapi_content_types_schema key from the strapi_core_store_settings table as suggested here Discord