How do I know what to set my pool to in my database.yml file?

Hey all,

Longtime listener, first-time caller here… my Postgres database says it allows the following:


What should my corresponding “pool” setting be in this scenario? 6? 120? Something else entirely? Thanks in advance for any help here.

The pool size should be equal (or greater than) the maximum amount of threads you may have. For example, if you’re running Puma with a setting of 16 threads, you should set your pool to at least 16. If you’re running workers, you should take that into consideration as well.