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

Let me try to explain my issue, and what this configuration resolved. I am using multiple environments - dev, staging, production. In dev, the content isn’t much populated, whereas in staging and production, the content is populated. During development, when I changed existing collection types, it worked fine. However, during deployment to staging and production, I was getting timeout. This was because, migrations that occur automatically during starting the Strapi app take time when there’s considerable content in the tables. My website has 850+ pages. I noted that this timeout issue was only because of the quantum of data. Removing content caused the start to work normally. So, we raised an issue with Strapi support and ended up increasing acquireConnectionTimeout. Before raising the ticket, “acquireConnectionTimeout” was not mentioned in the docs, and was later added.

I pasted the entire object just so that someone else might try it. The only change I really wanted was to increase “acquireConnectionTimeout” for this issue. I changed the max pool to 5 because postgres instance I was using had a max limit of 5.

Same config may or may not resolve your issue. You can refer to knex documentation since Strapi uses knex.