5 ms·
What is the best way to establish optimal pool size? The article seems to gloss over this and instead mentions 'you need to set pool: 25', but I doubt this is a
by acanby 13y ago
What is the best way to establish optimal pool size? The article seems to gloss over this and instead mentions 'you need to set pool: 25', but I doubt this is a one size fits all solution.
Anyone have any experience profiling these sorts of things that can share some info?
- trustfundbaby 13y agoYou 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.