Prompt that adds up database connections across all instances and sets pool size and time limits. Paste it into an AI tool of your choice, which then sizes the connection pool.
Results depend on the tool, the model and what you enter.
Fill in
What you type stays in this browser window. We store and send nothing.
Which database?
PostgreSQL
MySQL or MariaDB
SQL Server
managed cloud database
another one
How does the application run?
one server
several instances behind a load balancer
autoscaling containers
serverless functions
web server plus background workers
What do you see?
timeouts at traffic peaks
too many connections errors
slow responses for no clear reason
database CPU low, app waiting
new errors after scaling
Your prompt
Help me size the connection pool to our database.
Database: [Database]
Setup: [Setup]
Symptom: [Symptom]
Steps: 1. Read the pool settings, the number of instances and workers and the database's maximum connections, and calculate how many connections can be open at once in the worst case. 2. Compare that with what the database can handle, minus a reserve for maintenance and admin access. 3. Check the metrics to see whether requests mostly wait for a free connection or whether the database itself is slow. 4. Propose a pool size per instance and explain why a bigger pool is not automatically faster. 5. Set the wait time for a connection, the query time limit and the lifetime of idle connections. 6. Check whether transactions hold connections longer than needed, for example during external calls, and whether a connection proxy in front would help.
Output: connection calculation, recommended settings with reasons, list of long-held connections and a load test plan.
Take particular care to count all instances together and hold connections as briefly as possible.
Before you answer, check: Are all instructions met? If key information is missing or a placeholder in square brackets is still in the text, ask instead of guessing. Mark assumptions as assumptions.
You have edited the prompt. Changes in the fields above no longer overwrite it.
This is an instruction for an AI, not the result itself.
Fill in the fields or tap a suggestion. Leave out names, addresses and other personal data.
Copy the finished prompt into an AI tool of your choice.
Paste the pool settings, the number of instances and workers, the database connection limit and metrics on wait times and errors.
Why does this work?
More connections sound like more speed, but every new instance multiplies the pool. On the next scale-up the database starts refusing connections, exactly when traffic is highest.
Tips
Change pool settings step by step and measure under realistic load after each change.
Prompt that plans a data backfill in small, resumable batches with clear brakes.
Prompt · Intermediate · about 15 min
You may use our prompts freely, including at work. Please do not republish them as your own collection. We give no warranty for AI results; check them yourself. Terms of use