Hi!
I’ve been successfully deploying strapi and suddenly, I don’t understand why it returns this error:
error: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
The only changes that I have made have been in the database models and both in the web application and in the database I have contracted the starter plan, which worked perfectly until now.
Can you help me?
Hi @Bipolab-eu,
From searching online, it seems that there may be some version compatibility issues with knex/pg/node. More info in this thread. You may want to check these to confirm that the versions that you have specified are compatible.
may you share the thread?
Thank you Jade.
I have been reading a lot of threads and is a Strapi 4 bug.
I think version 4 is not very strong yet, so I will continue to use version 3 for production. These bugs take a lot of time and it’s frustrating.
I am running in this issue as well. Has anyone found a good amount of pool
and RAM quantity to avoid running in this issue?
I have Pull Request Previews turned off.
My node Strapi service is running on 2 CPU and 4GB RAM.
My Postgres database is running on 2 CPU and 4GB RAM.
I am using the following packages:
"@strapi/strapi": "4.1.3",
"pg": "^8.7.3",
I’m using the following settings in /config/env/production/database.js
const { parse } = require("pg-connection-string");
module.exports = ({ env }) => {
const { host, port, database, user, password } = parse(env("DATABASE_URL"));
return {
connection: {
client: "postgres",
connection: {
host,
port,
database,
user,
password,
ssl: {
rejectUnauthorized: false,
},
},
debug: true,
pool: {
min: 0,
max: 10,
idleTimeoutMillis: 30000000,
createTimeoutMillis: 30000000,
acquireTimeoutMillis: 30000000,
propagateCreateError: false,
},
},
};
};