documentation
documentation copied to clipboard
Following AWS Deploy from Strapi Doc get Error
Bug report
Describe the bug
Everything went fine till point 6. Link
Reaching that point I get this error
error KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
Surfing the issues on this repo I added pool options to my config/database.js
like follows
module.exports = ({ env }) => ({
defaultConnection: "default",
connections: {
default: {
connector: "bookshelf",
settings: {
client: "postgres",
host: env("DATABASE_HOST", "127.0.0.1"),
port: env.int("DATABASE_PORT", 5432),
database: env("DATABASE_NAME", "strapi"),
username: env("DATABASE_USERNAME", ""),
password: env("DATABASE_PASSWORD", ""),
},
options: {
ssl: false,
pool: {
min: 0,
max: 100,
idleTimeoutMillis: 60000,
createTimeoutMillis: 60000,
acquireTimeoutMillis: 60000,
},
},
},
},
});
A clear and concise description of what the bug is.
Steps to reproduce the behavior
- Follow the docs till point 6
- Run command
pm2 start ecosystem.config.js
- See error
Expected behavior
Strapi server starts
Screenshots

What size Database (and type) and can you connect to the database from the commandline using a CLI db client (like mysql or psql?)
FIxed changing inbound rules
to allow TCP/IP
connections: please update documentation adding a step in RDS DB creation
Hi - I am also experiencing this same error. Can't figure out any solution. @wanbinkimoon how did you add the inbound rules to allow TCP/IP? Thanks
@erik-valtechsd in the RDS Db instance page there is a Securuty
tab there you can edit which TCP/IP connections are allowed or not
also max pool allowed is 15 so my code changed as follows
module.exports = ({ env }) => ({
defaultConnection: "default",
connections: {
default: {
connector: "bookshelf",
settings: {
client: "postgres",
host: env("DATABASE_HOST", "127.0.0.1"),
port: env.int("DATABASE_PORT", 5432),
database: env("DATABASE_NAME", "strapi"),
username: env("DATABASE_USERNAME", ""),
password: env("DATABASE_PASSWORD", ""),
},
options: {
ssl: false,
pool: {
min: 0,
max: 15, // <---- here max is 15
idleTimeoutMillis: 60000,
createTimeoutMillis: 60000,
acquireTimeoutMillis: 60000,
},
},
},
},
});
We plan to refactor the deployment docs soon, going to transfer this issue to our docs repo.
Hello. I'm sorry that you were having troubles and that this issue didn't get more attention sooner. I'm cleaning up old documentation issues and I will close this issue now. Feel free to open a new issue if you're still having trouble with the documentation for Strapi v4.11+.