As per https://devcenter.heroku.com/articles/heroku-postgres-legacy-plans the connection limit is 500

As per https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server "Generally, PostgreSQL on good hardware can support a few hundred connections"

What are the determining factors in this limit? #CPU cores? RAM? OS?


First of all, the GUC max_connections - a setting in postgresql.conf.

Heroku obviously limits this to 20 for the "Starter Tier" and 500 for the "Production Tier".

The maximum number is not limited by Postgres itself, but by available system resources. Typically, performance degrades with too many concurrent connections, so even if you can set max_connections = 1000, it's probably unwise. Here is a blog with instructions by someone who did.

| improve this answer | |
  • Thanks Erwin. So which system resources are limiting? Sounds like #cores and spindles. Is a particular OS better than others? – Neil McGuigan Mar 19 '15 at 23:30
  • @NeilMcGuigan: Follow the link, the blog entry has a list. – Erwin Brandstetter Mar 19 '15 at 23:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.