Hacker News new | ask | show | jobs
by trustfundbaby 4772 days ago
You probably want to find out max_connections for your server.

Then figure out how many other connections you'll need outside your server (rails console, cron jobs, commandline) subtract that and you have your number.

I like to have about 10 spare connections.

Running

select name, setting from pg_settings where name = 'max_connections';

in postgres. I see I have 100 max connections.

So that minus 10 gives me a pool size of 90.