Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku postgresql max number of connections

base on this one https://devcenter.heroku.com/articles/heroku-postgres-plans heroku specifies the max number of connection in the database.

my question is, does the max number of connection equal to the number of logged in users?

like If I have max limit of 60, does it mean I can have max 60 logged in users?

like image 810
rav Avatar asked May 09 '14 03:05

rav


People also ask

How many connections PostgreSQL can handle?

PostgreSQL Connection Limits 15 connections are reserved for the superuser to maintain the state and integrity of your database, and 100 connections are available for you and your applications. If the number of connections to the database exceeds the 100-connection limit, new connections fail and return an error.

Is Postgres free on Heroku?

Heroku offers a free plan for hosting PostgreSQL databases. This can be handy if you're getting started with a new project or "just quickly need a hosted database" for experimentation or prototyping.

Is Heroku Postgres good?

Heroku's Postgres open-source database is the most effective service for developers who want to build engaging apps. With all of its features and Heroku's experience managing databases, it guarantees security and compliance with GDPR.


1 Answers

No, it means your app should have at most 60 db connections open in it's connection pool. That just means your app can only send 60 simultaneous requests to the db.

It has nothing to do with logged in users, but if your 61 logged in users simultaneously send requests to your app, one of them is going to wait a bit till a connection is free in the connection pool.

http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html

like image 55
Lucas Polonio Avatar answered Sep 25 '22 20:09

Lucas Polonio